From 2073252d5ab6a850886ae942ae1aa36870e0f765 Mon Sep 17 00:00:00 2001 From: James Sturtevant Date: Tue, 25 Mar 2025 06:59:26 -0700 Subject: [PATCH] Ginkgo skip needs to run inside leaf node otherwise it panics Signed-off-by: James Sturtevant --- test/e2e/common/node/security_context.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/e2e/common/node/security_context.go b/test/e2e/common/node/security_context.go index 4c6a5a7ab83..6d34d1e372c 100644 --- a/test/e2e/common/node/security_context.go +++ b/test/e2e/common/node/security_context.go @@ -66,7 +66,9 @@ var _ = SIGDescribe("Security Context", func() { }) ginkgo.Context("When creating a pod with HostUsers", func() { - e2eskipper.SkipIfNodeOSDistroIs("windows") + ginkgo.BeforeEach(func() { + e2eskipper.SkipIfNodeOSDistroIs("windows") + }) containerName := "userns-test" makePod := func(hostUsers bool) *v1.Pod { @@ -959,7 +961,9 @@ var _ = SIGDescribe("Security Context", func() { }) var _ = SIGDescribe("User Namespaces for Pod Security Standards [LinuxOnly]", func() { - e2eskipper.SkipIfNodeOSDistroIs("windows") + ginkgo.BeforeEach(func() { + e2eskipper.SkipIfNodeOSDistroIs("windows") + }) f := framework.NewDefaultFramework("user-namespaces-pss-test") f.NamespacePodSecurityLevel = admissionapi.LevelRestricted