kubeadm: check the GV after the config migration

Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
Dave Chen 2023-07-04 22:52:58 +08:00
parent 3149875175
commit 31943cc3f4

View File

@ -451,6 +451,15 @@ func TestMigrateOldConfig(t *testing.T) {
t.Fatalf("migration failed to produce config kind: %s", expectedKind) t.Fatalf("migration failed to produce config kind: %s", expectedKind)
} }
} }
expectedGV := gv
if test.allowExperimental {
expectedGV = gvExperimental
}
for _, gvk := range gvks {
if gvk.GroupVersion().String() != expectedGV {
t.Errorf("GV mismatch, expected GV: %s, got GV: %s", expectedGV, gvk.GroupVersion().String())
}
}
} }
}) })
} }