mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Merge pull request #80213 from bclau/tests/skips-windows-unrelated-tests
tests: Skips Windows-unrelated tests on Windows
This commit is contained in:
@@ -54,7 +54,9 @@ var _ = ginkgo.Describe("[sig-storage] ConfigMap", func() {
|
||||
doConfigMapE2EWithoutMappings(f, 0, 0, &defaultMode)
|
||||
})
|
||||
|
||||
ginkgo.It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [NodeFeature:FSGroup]", func() {
|
||||
ginkgo.It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [LinuxOnly] [NodeFeature:FSGroup]", func() {
|
||||
// Windows does not support RunAsUser / FSGroup SecurityContext options, and it does not support setting file permissions.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
defaultMode := int32(0440) /* setting fsGroup sets mode to at least 440 */
|
||||
doConfigMapE2EWithoutMappings(f, 1000, 1001, &defaultMode)
|
||||
})
|
||||
@@ -69,7 +71,9 @@ var _ = ginkgo.Describe("[sig-storage] ConfigMap", func() {
|
||||
doConfigMapE2EWithoutMappings(f, 1000, 0, nil)
|
||||
})
|
||||
|
||||
ginkgo.It("should be consumable from pods in volume as non-root with FSGroup [NodeFeature:FSGroup]", func() {
|
||||
ginkgo.It("should be consumable from pods in volume as non-root with FSGroup [LinuxOnly] [NodeFeature:FSGroup]", func() {
|
||||
// Windows does not support RunAsUser / FSGroup SecurityContext options.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
doConfigMapE2EWithoutMappings(f, 1000, 1001, nil)
|
||||
})
|
||||
|
||||
@@ -103,7 +107,9 @@ var _ = ginkgo.Describe("[sig-storage] ConfigMap", func() {
|
||||
doConfigMapE2EWithMappings(f, 1000, 0, nil)
|
||||
})
|
||||
|
||||
ginkgo.It("should be consumable from pods in volume with mappings as non-root with FSGroup [NodeFeature:FSGroup]", func() {
|
||||
ginkgo.It("should be consumable from pods in volume with mappings as non-root with FSGroup [LinuxOnly] [NodeFeature:FSGroup]", func() {
|
||||
// Windows does not support RunAsUser / FSGroup SecurityContext options.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
doConfigMapE2EWithMappings(f, 1000, 1001, nil)
|
||||
})
|
||||
|
||||
|
||||
@@ -87,7 +87,9 @@ var _ = ginkgo.Describe("[sig-storage] Downward API volume", func() {
|
||||
})
|
||||
})
|
||||
|
||||
ginkgo.It("should provide podname as non-root with fsgroup [NodeFeature:FSGroup]", func() {
|
||||
ginkgo.It("should provide podname as non-root with fsgroup [LinuxOnly] [NodeFeature:FSGroup]", func() {
|
||||
// Windows does not support RunAsUser / FSGroup SecurityContext options.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
podName := "metadata-volume-" + string(uuid.NewUUID())
|
||||
uid := int64(1001)
|
||||
gid := int64(1234)
|
||||
@@ -101,7 +103,9 @@ var _ = ginkgo.Describe("[sig-storage] Downward API volume", func() {
|
||||
})
|
||||
})
|
||||
|
||||
ginkgo.It("should provide podname as non-root with fsgroup and defaultMode [NodeFeature:FSGroup]", func() {
|
||||
ginkgo.It("should provide podname as non-root with fsgroup and defaultMode [LinuxOnly] [NodeFeature:FSGroup]", func() {
|
||||
// Windows does not support RunAsUser / FSGroup SecurityContext options, and it does not support setting file permissions.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
podName := "metadata-volume-" + string(uuid.NewUUID())
|
||||
uid := int64(1001)
|
||||
gid := int64(1234)
|
||||
|
||||
@@ -41,7 +41,13 @@ var (
|
||||
var _ = ginkgo.Describe("[sig-storage] EmptyDir volumes", func() {
|
||||
f := framework.NewDefaultFramework("emptydir")
|
||||
|
||||
ginkgo.Context("when FSGroup is specified [NodeFeature:FSGroup]", func() {
|
||||
ginkgo.Context("when FSGroup is specified [LinuxOnly] [NodeFeature:FSGroup]", func() {
|
||||
|
||||
ginkgo.BeforeEach(func() {
|
||||
// Windows does not support the FSGroup SecurityContext option.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
})
|
||||
|
||||
ginkgo.It("new files should be created with FSGroup ownership when container is root", func() {
|
||||
doTestSetgidFSGroup(f, testImageRootUid, v1.StorageMediumMemory)
|
||||
})
|
||||
|
||||
@@ -55,7 +55,9 @@ var _ = ginkgo.Describe("[sig-storage] Projected configMap", func() {
|
||||
doProjectedConfigMapE2EWithoutMappings(f, 0, 0, &defaultMode)
|
||||
})
|
||||
|
||||
ginkgo.It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [NodeFeature:FSGroup]", func() {
|
||||
ginkgo.It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [LinuxOnly] [NodeFeature:FSGroup]", func() {
|
||||
// Windows does not support RunAsUser / FSGroup SecurityContext options, and it does not support setting file permissions.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
defaultMode := int32(0440) /* setting fsGroup sets mode to at least 440 */
|
||||
doProjectedConfigMapE2EWithoutMappings(f, 1000, 1001, &defaultMode)
|
||||
})
|
||||
@@ -70,7 +72,9 @@ var _ = ginkgo.Describe("[sig-storage] Projected configMap", func() {
|
||||
doProjectedConfigMapE2EWithoutMappings(f, 1000, 0, nil)
|
||||
})
|
||||
|
||||
ginkgo.It("should be consumable from pods in volume as non-root with FSGroup [NodeFeature:FSGroup]", func() {
|
||||
ginkgo.It("should be consumable from pods in volume as non-root with FSGroup [LinuxOnly] [NodeFeature:FSGroup]", func() {
|
||||
// Windows does not support RunAsUser / FSGroup SecurityContext options.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
doProjectedConfigMapE2EWithoutMappings(f, 1000, 1001, nil)
|
||||
})
|
||||
|
||||
@@ -104,7 +108,9 @@ var _ = ginkgo.Describe("[sig-storage] Projected configMap", func() {
|
||||
doProjectedConfigMapE2EWithMappings(f, 1000, 0, nil)
|
||||
})
|
||||
|
||||
ginkgo.It("should be consumable from pods in volume with mappings as non-root with FSGroup [NodeFeature:FSGroup]", func() {
|
||||
ginkgo.It("should be consumable from pods in volume with mappings as non-root with FSGroup [LinuxOnly] [NodeFeature:FSGroup]", func() {
|
||||
// Windows does not support RunAsUser / FSGroup SecurityContext options.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
doProjectedConfigMapE2EWithMappings(f, 1000, 1001, nil)
|
||||
})
|
||||
|
||||
|
||||
@@ -87,7 +87,9 @@ var _ = ginkgo.Describe("[sig-storage] Projected downwardAPI", func() {
|
||||
})
|
||||
})
|
||||
|
||||
ginkgo.It("should provide podname as non-root with fsgroup [NodeFeature:FSGroup]", func() {
|
||||
ginkgo.It("should provide podname as non-root with fsgroup [LinuxOnly] [NodeFeature:FSGroup]", func() {
|
||||
// Windows does not support RunAsUser / FSGroup SecurityContext options.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
podName := "metadata-volume-" + string(uuid.NewUUID())
|
||||
uid := int64(1001)
|
||||
gid := int64(1234)
|
||||
@@ -101,7 +103,9 @@ var _ = ginkgo.Describe("[sig-storage] Projected downwardAPI", func() {
|
||||
})
|
||||
})
|
||||
|
||||
ginkgo.It("should provide podname as non-root with fsgroup and defaultMode [NodeFeature:FSGroup]", func() {
|
||||
ginkgo.It("should provide podname as non-root with fsgroup and defaultMode [LinuxOnly] [NodeFeature:FSGroup]", func() {
|
||||
// Windows does not support RunAsUser / FSGroup SecurityContext options, and it does not support setting file permissions.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
podName := "metadata-volume-" + string(uuid.NewUUID())
|
||||
uid := int64(1001)
|
||||
gid := int64(1234)
|
||||
|
||||
@@ -120,7 +120,9 @@ var _ = framework.KubeDescribe("Security Context", func() {
|
||||
}
|
||||
}
|
||||
|
||||
ginkgo.It("should run with an explicit non-root user ID", func() {
|
||||
ginkgo.It("should run with an explicit non-root user ID [LinuxOnly]", func() {
|
||||
// creates a pod with RunAsUser, which is not supported on Windows.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
name := "explicit-nonroot-uid"
|
||||
pod := makeNonRootPod(name, rootImage, pointer.Int64Ptr(1234))
|
||||
pod = podClient.Create(pod)
|
||||
@@ -128,7 +130,9 @@ var _ = framework.KubeDescribe("Security Context", func() {
|
||||
podClient.WaitForSuccess(name, framework.PodStartTimeout)
|
||||
framework.ExpectNoError(podClient.MatchContainerOutput(name, name, "1234"))
|
||||
})
|
||||
ginkgo.It("should not run with an explicit root user ID", func() {
|
||||
ginkgo.It("should not run with an explicit root user ID [LinuxOnly]", func() {
|
||||
// creates a pod with RunAsUser, which is not supported on Windows.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
name := "explicit-root-uid"
|
||||
pod := makeNonRootPod(name, nonRootImage, pointer.Int64Ptr(0))
|
||||
pod = podClient.Create(pod)
|
||||
|
||||
@@ -29,7 +29,13 @@ import (
|
||||
"github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var _ = framework.KubeDescribe("Sysctls [NodeFeature:Sysctls]", func() {
|
||||
var _ = framework.KubeDescribe("Sysctls [LinuxOnly] [NodeFeature:Sysctls]", func() {
|
||||
|
||||
ginkgo.BeforeEach(func() {
|
||||
// sysctl is not supported on Windows.
|
||||
framework.SkipIfNodeOSDistroIs("windows")
|
||||
})
|
||||
|
||||
f := framework.NewDefaultFramework("sysctl")
|
||||
var podClient *framework.PodClient
|
||||
|
||||
|
||||
Reference in New Issue
Block a user