From a9f935f834a76b6920dade6f4d55fa9eade79f82 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Thu, 26 Dec 2024 16:14:24 +0800 Subject: [PATCH] Use the SC mapping cm in all migration cases. The migration case is verified under the following environments now: * CSI. * CSI data mover. * FSB. Signed-off-by: Xun Jiang --- test/e2e/migration/migration.go | 40 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/test/e2e/migration/migration.go b/test/e2e/migration/migration.go index 7eb57daaec..5043bd5554 100644 --- a/test/e2e/migration/migration.go +++ b/test/e2e/migration/migration.go @@ -356,26 +356,26 @@ func (m *migrationE2E) Restore() error { }) By(fmt.Sprintf("Restore %s", m.CaseBaseName), func() { - if m.VeleroCfg.SnapshotMoveData { - cmName := "datamover-storage-class-config" - labels := map[string]string{"velero.io/change-storage-class": "RestoreItemAction", - "velero.io/plugin-config": ""} - data := map[string]string{kibishii.KibishiiStorageClassName: test.StorageClassName} - - By(fmt.Sprintf("Create ConfigMap %s in namespace %s", - cmName, StandbyVeleroCfg.VeleroNamespace), func() { - _, err := k8sutil.CreateConfigMap( - StandbyVeleroCfg.StandbyClient.ClientGo, - StandbyVeleroCfg.VeleroNamespace, - cmName, - labels, - data, - ) - Expect(err).To(Succeed(), fmt.Sprintf( - "failed to create ConfigMap in the namespace %q", - StandbyVeleroCfg.VeleroNamespace)) - }) - } + // Use the e2e-storage-class SC instead of the kibishii-storage-class, + // because the Standby cluster doesn't have a chance to create the kibishii resource. + cmName := "datamover-storage-class-config" + labels := map[string]string{"velero.io/change-storage-class": "RestoreItemAction", + "velero.io/plugin-config": ""} + data := map[string]string{kibishii.KibishiiStorageClassName: test.StorageClassName} + + By(fmt.Sprintf("Create ConfigMap %s in namespace %s", + cmName, StandbyVeleroCfg.VeleroNamespace), func() { + _, err := k8sutil.CreateConfigMap( + StandbyVeleroCfg.StandbyClient.ClientGo, + StandbyVeleroCfg.VeleroNamespace, + cmName, + labels, + data, + ) + Expect(err).To(Succeed(), fmt.Sprintf( + "failed to create ConfigMap in the namespace %q", + StandbyVeleroCfg.VeleroNamespace)) + }) Expect(veleroutil.VeleroRestore( m.Ctx,