diff --git a/tests/e2e/backup_restore_suite_test.go b/tests/e2e/backup_restore_suite_test.go index bd0c4b780f..82f26a273e 100644 --- a/tests/e2e/backup_restore_suite_test.go +++ b/tests/e2e/backup_restore_suite_test.go @@ -29,10 +29,8 @@ type BackupRestoreCase struct { type ApplicationBackupRestoreCase struct { BackupRestoreCase - ApplicationTemplate string - PvcSuffixName string - MustGatherFiles []string // list of files expected in must-gather under quay.io.../clusters/clustername/... ie. "namespaces/openshift-adp/oadp.openshift.io/dpa-ts-example-velero/ts-example-velero.yml" - MustGatherValidationFunction *func(string) error // validation function for must-gather where string parameter is the path to "quay.io.../clusters/clustername/" + ApplicationTemplate string + PvcSuffixName string } func todoListReady(preBackupState bool, twoVol bool, database string) VerificationFunction { diff --git a/tests/e2e/lib/apps.go b/tests/e2e/lib/apps.go index d89b30c273..75c8429486 100755 --- a/tests/e2e/lib/apps.go +++ b/tests/e2e/lib/apps.go @@ -352,7 +352,7 @@ func RunMustGather(oc_cli string, artifact_dir string) error { ocClient := oc_cli ocAdmin := "adm" mustGatherCmd := "must-gather" - mustGatherImg := "--image=quay.io/konveyor/oadp-must-gather:latest" + mustGatherImg := "--image=ttl.sh/oadp/must-gather:mateus-test" destDir := "--dest-dir=" + artifact_dir cmd := exec.Command(ocClient, ocAdmin, mustGatherCmd, mustGatherImg, destDir) diff --git a/tests/e2e/lib/dpa_helpers.go b/tests/e2e/lib/dpa_helpers.go index 88094b7196..46bdea789b 100644 --- a/tests/e2e/lib/dpa_helpers.go +++ b/tests/e2e/lib/dpa_helpers.go @@ -113,7 +113,7 @@ func (v *DpaCustomResource) Build(backupRestoreType BackupRestoreType) *oadpv1al } // Uncomment to override plugin images to use dpaSpec.UnsupportedOverrides = map[oadpv1alpha1.UnsupportedImageKey]string{ - // oadpv1alpha1.VeleroImageKey: "quay.io/konveyor/velero:oadp-1.1", + oadpv1alpha1.VeleroImageKey: "quay.io/konveyor/velero:oadp-1.4", } return &dpaSpec } diff --git a/tests/e2e/must-gather_suite_test.go b/tests/e2e/must-gather_suite_test.go index cbd9539c4e..69700f03cd 100644 --- a/tests/e2e/must-gather_suite_test.go +++ b/tests/e2e/must-gather_suite_test.go @@ -3,7 +3,6 @@ package e2e_test import ( "log" "os" - "strings" "time" "github.com/onsi/ginkgo/v2" @@ -46,7 +45,7 @@ var _ = ginkgo.Describe("Backup and restore tests with must-gather", func() { gomega.Expect(err).ToNot(gomega.HaveOccurred()) clusterDir := "" for _, dirEntry := range dirEntries { - if dirEntry.IsDir() && strings.HasPrefix(dirEntry.Name(), "quay-io") { + if dirEntry.IsDir() { mustGatherImageDir := baseReportDir + "/must-gather/" + dirEntry.Name() // extract must-gather.tar.gz err = lib.ExtractTarGz(mustGatherImageDir, "must-gather.tar.gz") @@ -57,22 +56,22 @@ var _ = ginkgo.Describe("Backup and restore tests with must-gather", func() { for _, cluster := range clusters { if cluster.IsDir() { clusterDir = mustGatherDir + "/clusters/" + cluster.Name() + if clusterDir != "" { + for _, file := range []string{ + "namespaces/" + namespace + "/oadp.openshift.io/dpa-ts-" + instanceName + "/ts-" + instanceName + ".yml", + "namespaces/" + namespace + "/velero.io/backupstoragelocations.velero.io/ts-" + instanceName + "-1.yaml", + } { + log.Printf("checking if %v is present in must-gather", file) + _, err := os.Stat(clusterDir + "/" + file) + gomega.Expect(err).ToNot(gomega.HaveOccurred()) + } + } } } } } - if len(brCase.MustGatherFiles) > 0 && clusterDir != "" { - for _, file := range brCase.MustGatherFiles { - _, err := os.Stat(clusterDir + "/" + file) - gomega.Expect(err).ToNot(gomega.HaveOccurred()) - } - } - if brCase.MustGatherValidationFunction != nil && clusterDir != "" { - err = (*brCase.MustGatherValidationFunction)(clusterDir) - gomega.Expect(err).ToNot(gomega.HaveOccurred()) - } }, - ginkgo.Entry("Mongo application DATAMOVER", ginkgo.FlakeAttempts(flakeAttempts), ApplicationBackupRestoreCase{ + ginkgo.FEntry("Mongo application DATAMOVER", ginkgo.FlakeAttempts(flakeAttempts), ApplicationBackupRestoreCase{ ApplicationTemplate: "./sample-applications/mongo-persistent/mongo-persistent-csi.yaml", BackupRestoreCase: BackupRestoreCase{ Namespace: "mongo-persistent", @@ -82,10 +81,6 @@ var _ = ginkgo.Describe("Backup and restore tests with must-gather", func() { PostRestoreVerify: todoListReady(false, false, "mongo"), BackupTimeout: 20 * time.Minute, }, - MustGatherFiles: []string{ - "namespaces/" + namespace + "/oadp.openshift.io/dpa-ts-" + instanceName + "/ts-" + instanceName + ".yml", - "namespaces/" + namespace + "/velero.io/backupstoragelocations.velero.io/ts-" + instanceName + "-1.yaml", - }, }, nil), ) }) diff --git a/tests/e2e/upgrade_suite_test.go b/tests/e2e/upgrade_suite_test.go index fb8b0bef08..5375bd272b 100644 --- a/tests/e2e/upgrade_suite_test.go +++ b/tests/e2e/upgrade_suite_test.go @@ -55,10 +55,10 @@ var _ = ginkgo.Describe("OADP upgrade scenarios", ginkgo.Ordered, func() { subscriptionSource = "redhat-operators" } - log.Print("Creating Subscription oadp-operator") + log.Printf("Creating Subscription %v", subscriptionPackage) subscription := v1alpha1.Subscription{ ObjectMeta: metav1.ObjectMeta{ - Name: "oadp-operator", + Name: subscriptionPackage, Namespace: namespace, }, Spec: &v1alpha1.SubscriptionSpec{