From 5378b4d2201d4cb3dddc00dd73c5bb6cef2a0fd5 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 14 Oct 2021 09:14:26 +0200 Subject: [PATCH] e2e: restore volume lifecycle check for most tests, II Besides "subPath should unmount if pod is gracefully deleted while kubelet is down" we also need a special case for "subPath should unmount if pod is force deleted while kubelet is down". This fixes a test failure in https://testgrid.k8s.io/sig-storage-kubernetes#gce-serial --- test/e2e/storage/drivers/csi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/storage/drivers/csi.go b/test/e2e/storage/drivers/csi.go index b82d46f01c2..021e6200f28 100644 --- a/test/e2e/storage/drivers/csi.go +++ b/test/e2e/storage/drivers/csi.go @@ -40,6 +40,7 @@ import ( "encoding/json" "errors" "fmt" + "regexp" "strconv" "strings" "sync" @@ -248,8 +249,7 @@ func (h *hostpathCSIDriver) PrepareTest(f *framework.Framework) (*storageframewo // test that it breaks. // TODO: enable this check once issue is resolved for csi-host-path driver // (https://github.com/kubernetes/kubernetes/pull/104858). - if strings.Contains(ginkgo.CurrentGinkgoTestDescription().FullTestText, - "should unmount if pod is gracefully deleted while kubelet is down") { + if regexp.MustCompile("should unmount if pod is.*deleted while kubelet is down").MatchString(ginkgo.CurrentGinkgoTestDescription().FullTestText) { o.DriverContainerArguments = append(o.DriverContainerArguments, "--check-volume-lifecycle=false") }