diff --git a/e2e/deployers/crud.go b/e2e/deployers/crud.go index 3dca636c6..f5c7f664c 100644 --- a/e2e/deployers/crud.go +++ b/e2e/deployers/crud.go @@ -209,7 +209,7 @@ func DeleteSubscription(s Subscription, w workloads.Workload, log logr.Logger) e } func GetCombinedName(d Deployer, w workloads.Workload) string { - return strings.ToLower(d.GetName() + "-" + w.GetName() + "-" + w.GetAppName()) + return strings.ToLower(d.GetName() + "-" + w.GetName()) } func GetNamespace(d Deployer, w workloads.Workload) string { diff --git a/e2e/deployers/discoveredapps.go b/e2e/deployers/discoveredapps.go index b7a4d8494..61cf3cc8d 100644 --- a/e2e/deployers/discoveredapps.go +++ b/e2e/deployers/discoveredapps.go @@ -109,5 +109,6 @@ func (d DiscoveredApps) Undeploy(w workloads.Workload) error { } func (d DiscoveredApps) IsWorkloadSupported(w workloads.Workload) bool { - return w.GetName() != "Deploy-cephfs" + // TODO: This works only for the default configuration. Replace with a more robust way. + return w.GetName() != "cephfs" } diff --git a/e2e/exhaustive_suite_test.go b/e2e/exhaustive_suite_test.go index 93963c4e7..1bb2f1640 100644 --- a/e2e/exhaustive_suite_test.go +++ b/e2e/exhaustive_suite_test.go @@ -4,7 +4,6 @@ package e2e_test import ( - "fmt" "strings" "testing" @@ -32,30 +31,29 @@ var ( Deployers = []deployers.Deployer{subscription, appset, discoveredApps} ) -func generateSuffix(storageClassName string) string { - suffix := storageClassName +func storageName(storageClassName string) string { + name := storageClassName if strings.ToLower(storageClassName) == "rook-ceph-block" { - suffix = "rbd" + name = "rbd" } if strings.ToLower(storageClassName) == "rook-cephfs" { - suffix = "cephfs" + name = "cephfs" } - return suffix + return name } func generateWorkloads([]workloads.Workload) { pvcSpecs := util.GetPVCSpecs() for _, pvcSpec := range pvcSpecs { // add storageclass name to deployment name - suffix := generateSuffix(pvcSpec.StorageClassName) deployment := &workloads.Deployment{ Path: GITPATH, Revision: GITREVISION, AppName: APPNAME, - Name: fmt.Sprintf("Deploy-%s", suffix), + Name: storageName(pvcSpec.StorageClassName), PVCSpec: pvcSpec, } Workloads = append(Workloads, deployment)