From 13342675e70e189f289fd575ea8d6242293f886f Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 16 Feb 2022 15:44:02 -0800 Subject: [PATCH] =?UTF-8?q?don=E2=80=99t=20check=20pre-release=20versions?= =?UTF-8?q?=20against=20known=20capi=20images?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/e2e/e2e_suite_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go index 4b8a7a7fbe7..700717ce869 100644 --- a/test/e2e/e2e_suite_test.go +++ b/test/e2e/e2e_suite_test.go @@ -508,8 +508,10 @@ func getLatestSkuForMinor(version string, skus semver.Versions) string { } } } else if v, err := semver.ParseTolerant(version); err == nil { - // if the version is in the format "v1.21.2", we make sure we have an existing image for it. - Expect(skus).To(ContainElement(v), fmt.Sprintf("Provided Kubernetes version %s does not have a corresponding VM image in the capi offer", version)) + if len(v.Pre) == 0 { + // if the version is in the format "v1.21.2", we make sure we have an existing image for it. + Expect(skus).To(ContainElement(v), fmt.Sprintf("Provided Kubernetes version %s does not have a corresponding VM image in the capi offer", version)) + } } // otherwise, we just return the version as-is. This allows for versions in other formats, such as "latest" or "latest-1.21". return version