Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1353 from kinvolk/surajssd/enable-velero-tests
Browse files Browse the repository at this point in the history
velero: Add e2e tests
  • Loading branch information
surajssd authored Feb 3, 2021
2 parents 5fcc73c + 7f421f1 commit 8683071
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
24 changes: 24 additions & 0 deletions ci/packet/packet-cluster.lokocfg.envsubst
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,27 @@ component "web-ui" {
}

component "inspektor-gadget" {}

component "velero" {
provider = "restic"

restic {
credentials = <<EOF
[default]
aws_access_key_id = "$AWS_ACCESS_KEY_ID"
aws_secret_access_key = "$AWS_SECRET_ACCESS_KEY"
EOF

backup_storage_location {
# External dependency: Ensure that this bucket exists on the S3.
bucket = "velero-test-ci"
region = "us-west-1"
provider = "aws"
}
}

metrics {
enabled = true
service_monitor = true
}
}
44 changes: 44 additions & 0 deletions test/components/velero/velero_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2021 The Lokomotive Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// +build packet
// +build e2e

package velero_test

import (
"testing"

testutil "github.com/kinvolk/lokomotive/test/components/util"
)

const namespace = "velero"

func TestVeleroDeployment(t *testing.T) {
t.Parallel()

client := testutil.CreateKubeClient(t)
deployment := "velero"

testutil.WaitForDeployment(t, client, namespace, deployment, testutil.RetryInterval, testutil.Timeout)
}

func TestResticDaemonset(t *testing.T) {
t.Parallel()

client := testutil.CreateKubeClient(t)
daemonset := "restic"

testutil.WaitForDaemonSet(t, client, namespace, daemonset, testutil.RetryInterval, testutil.Timeout)
}

0 comments on commit 8683071

Please sign in to comment.