Skip to content

Commit 8ee0ebd

Browse files
committed
Fix storage migrator unit test
1 parent dd06715 commit 8ee0ebd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

controllers/crdmigrator/crd_migrator_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,12 @@ func TestReconcile(t *testing.T) {
288288
if skipCRDMigrationPhases.Has(StorageVersionMigrationPhase) {
289289
// If storage version migration was skipped before, we now cannot deploy CRDs that remove v1beta1.
290290
g.Expect(err).To(HaveOccurred())
291-
g.Expect(err.Error()).To(ContainSubstring("status.storedVersions[0]: Invalid value: \"v1beta1\": must appear in spec.versions"))
291+
g.Expect(err.Error()).To(Or(
292+
// Kubernetes < v1.33.0
293+
ContainSubstring("status.storedVersions[0]: Invalid value: \"v1beta1\": must appear in spec.versions"),
294+
// Kubernetes >= v1.33.0
295+
ContainSubstring("status.storedVersions[0]: Invalid value: \"v1beta1\": missing from spec.versions"),
296+
))
292297
return
293298
}
294299
g.Expect(err).ToNot(HaveOccurred())

0 commit comments

Comments
 (0)