From 2126385f352178c255f64328a2768e4eee78d028 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 18 Nov 2021 15:22:11 +0100 Subject: [PATCH] test: disable some skew tests for Kubernetes 1.22 PMEM-CSI 0.9 lacks the necessary YAML files and the operator doesn't run (v1beta1 CSIDriver API). --- test/e2e/versionskew/operator.go | 8 ++++++++ test/e2e/versionskew/versionskew.go | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/e2e/versionskew/operator.go b/test/e2e/versionskew/operator.go index 25f95d888..99a3a04a4 100644 --- a/test/e2e/versionskew/operator.go +++ b/test/e2e/versionskew/operator.go @@ -249,6 +249,14 @@ var _ = deploy.DescribeForSome("versionskew", func(d *deploy.Deployment) bool { }) It("upgrade [Slow]", func() { + if base == "0.9" { + ver, err := k8sutil.GetKubernetesVersion(f.ClientConfig()) + framework.ExpectNoError(err, "get Kubernetes version") + if ver.Compare(1, 22) >= 0 { + Skip("PMEM-CSI operator v0.9.x uses the v1beta1 CSIDriver API which is not enabled in Kubernetes >= 1.22") + } + } + // First remove existing operator deployment // This is mandatory in case of OLM. Otherwise later downgrade // step might results in operator upgrade by the OLM. diff --git a/test/e2e/versionskew/versionskew.go b/test/e2e/versionskew/versionskew.go index 6a6438abc..3f22c24ba 100644 --- a/test/e2e/versionskew/versionskew.go +++ b/test/e2e/versionskew/versionskew.go @@ -46,7 +46,7 @@ const ( func baseSupportsKubernetes(ver version.Version) bool { switch ver { - case version.NewVersion(1, 21): + case version.NewVersion(1, 21), version.NewVersion(1, 22): return false default: return true