From 6a0c6d5b75cbedef0e9bc413e13e90274cd34ae8 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Thu, 27 Mar 2025 18:35:30 +0800 Subject: [PATCH] Fix the non data mover migration failure. Migration cases use the Kibishii as the workload, and SC mapping ConfigMap was needed for all scenarios, because standby cluster doesn't have the Kibishii SC after setting up. Signed-off-by: Xun Jiang --- test/e2e/migration/migration.go | 36 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/test/e2e/migration/migration.go b/test/e2e/migration/migration.go index 7eb57daae..82c794813 100644 --- a/test/e2e/migration/migration.go +++ b/test/e2e/migration/migration.go @@ -356,26 +356,24 @@ 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} + 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)) - }) - } + 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,