Add sig-storage prefix for common e2e tests

This commit is contained in:
xiangpengzhao 2017-10-17 14:42:15 +08:00
parent d0c4c5647f
commit 288737d2ad
3 changed files with 62 additions and 63 deletions

View File

@ -38,89 +38,88 @@ var (
testImageNonRootUid = imageutils.GetE2EImage(imageutils.MounttestUser)
)
var _ = framework.KubeDescribe("EmptyDir volumes", func() {
var _ = Describe("[sig-storage] EmptyDir volumes", func() {
f := framework.NewDefaultFramework("emptydir")
Context("when FSGroup is specified [Feature:FSGroup]", func() {
It("new files should be created with FSGroup ownership when container is root [sig-storage]", func() {
It("new files should be created with FSGroup ownership when container is root", func() {
doTestSetgidFSGroup(f, testImageRootUid, v1.StorageMediumMemory)
})
It("new files should be created with FSGroup ownership when container is non-root [sig-storage]", func() {
It("new files should be created with FSGroup ownership when container is non-root", func() {
doTestSetgidFSGroup(f, testImageNonRootUid, v1.StorageMediumMemory)
})
It("nonexistent volume subPath should have the correct mode and owner using FSGroup [sig-storage]", func() {
It("nonexistent volume subPath should have the correct mode and owner using FSGroup", func() {
doTestSubPathFSGroup(f, testImageNonRootUid, v1.StorageMediumMemory)
})
It("files with FSGroup ownership should support (root,0644,tmpfs) [sig-storage]", func() {
It("files with FSGroup ownership should support (root,0644,tmpfs)", func() {
doTest0644FSGroup(f, testImageRootUid, v1.StorageMediumMemory)
})
It("volume on default medium should have the correct mode using FSGroup [sig-storage]", func() {
It("volume on default medium should have the correct mode using FSGroup", func() {
doTestVolumeModeFSGroup(f, testImageRootUid, v1.StorageMediumDefault)
})
It("volume on tmpfs should have the correct mode using FSGroup [sig-storage]", func() {
It("volume on tmpfs should have the correct mode using FSGroup", func() {
doTestVolumeModeFSGroup(f, testImageRootUid, v1.StorageMediumMemory)
})
})
framework.ConformanceIt("volume on tmpfs should have the correct mode [sig-storage]", func() {
framework.ConformanceIt("volume on tmpfs should have the correct mode", func() {
doTestVolumeMode(f, testImageRootUid, v1.StorageMediumMemory)
})
framework.ConformanceIt("should support (root,0644,tmpfs) [sig-storage]", func() {
framework.ConformanceIt("should support (root,0644,tmpfs)", func() {
doTest0644(f, testImageRootUid, v1.StorageMediumMemory)
})
framework.ConformanceIt("should support (root,0666,tmpfs) [sig-storage]", func() {
framework.ConformanceIt("should support (root,0666,tmpfs)", func() {
doTest0666(f, testImageRootUid, v1.StorageMediumMemory)
})
framework.ConformanceIt("should support (root,0777,tmpfs) [sig-storage]", func() {
framework.ConformanceIt("should support (root,0777,tmpfs)", func() {
doTest0777(f, testImageRootUid, v1.StorageMediumMemory)
})
framework.ConformanceIt("should support (non-root,0644,tmpfs) [sig-storage]", func() {
framework.ConformanceIt("should support (non-root,0644,tmpfs)", func() {
doTest0644(f, testImageNonRootUid, v1.StorageMediumMemory)
})
framework.ConformanceIt("should support (non-root,0666,tmpfs) [sig-storage]", func() {
framework.ConformanceIt("should support (non-root,0666,tmpfs)", func() {
doTest0666(f, testImageNonRootUid, v1.StorageMediumMemory)
})
framework.ConformanceIt("should support (non-root,0777,tmpfs) [sig-storage]", func() {
framework.ConformanceIt("should support (non-root,0777,tmpfs)", func() {
doTest0777(f, testImageNonRootUid, v1.StorageMediumMemory)
})
framework.ConformanceIt("volume on default medium should have the correct mode [sig-storage]", func() {
framework.ConformanceIt("volume on default medium should have the correct mode", func() {
doTestVolumeMode(f, testImageRootUid, v1.StorageMediumDefault)
})
framework.ConformanceIt("should support (root,0644,default) [sig-storage]", func() {
framework.ConformanceIt("should support (root,0644,default)", func() {
doTest0644(f, testImageRootUid, v1.StorageMediumDefault)
})
framework.ConformanceIt("should support (root,0666,default) [sig-storage]", func() {
framework.ConformanceIt("should support (root,0666,default)", func() {
doTest0666(f, testImageRootUid, v1.StorageMediumDefault)
})
framework.ConformanceIt("should support (root,0777,default) [sig-storage]", func() {
framework.ConformanceIt("should support (root,0777,default)", func() {
doTest0777(f, testImageRootUid, v1.StorageMediumDefault)
})
framework.ConformanceIt("should support (non-root,0644,default) [sig-storage]", func() {
framework.ConformanceIt("should support (non-root,0644,default)", func() {
doTest0644(f, testImageNonRootUid, v1.StorageMediumDefault)
})
framework.ConformanceIt("should support (non-root,0666,default) [sig-storage]", func() {
framework.ConformanceIt("should support (non-root,0666,default)", func() {
doTest0666(f, testImageNonRootUid, v1.StorageMediumDefault)
})
framework.ConformanceIt("should support (non-root,0777,default) [sig-storage]", func() {
framework.ConformanceIt("should support (non-root,0777,default)", func() {
doTest0777(f, testImageNonRootUid, v1.StorageMediumDefault)
})
})

View File

@ -31,7 +31,7 @@ import (
//TODO : Consolidate this code with the code for emptyDir.
//This will require some smart.
var _ = framework.KubeDescribe("HostPath", func() {
var _ = Describe("[sig-storage] HostPath", func() {
f := framework.NewDefaultFramework("hostpath")
BeforeEach(func() {
@ -40,7 +40,7 @@ var _ = framework.KubeDescribe("HostPath", func() {
_ = os.Remove("/tmp/test-file")
})
framework.ConformanceIt("should give a volume the correct mode [sig-storage]", func() {
framework.ConformanceIt("should give a volume the correct mode", func() {
source := &v1.HostPathVolumeSource{
Path: "/tmp",
}
@ -56,7 +56,7 @@ var _ = framework.KubeDescribe("HostPath", func() {
})
// This test requires mounting a folder into a container with write privileges.
It("should support r/w [sig-storage]", func() {
It("should support r/w", func() {
filePath := path.Join(volumePath, "test-file")
retryDuration := 180
source := &v1.HostPathVolumeSource{
@ -80,7 +80,7 @@ var _ = framework.KubeDescribe("HostPath", func() {
})
})
It("should support subPath [sig-storage]", func() {
It("should support subPath", func() {
subPath := "sub-path"
fileName := "test-file"
retryDuration := 180
@ -112,7 +112,7 @@ var _ = framework.KubeDescribe("HostPath", func() {
})
})
It("should support existing directory subPath [sig-storage]", func() {
It("should support existing directory subPath", func() {
framework.SkipUnlessSSHKeyPresent()
subPath := "sub-path"
@ -158,7 +158,7 @@ var _ = framework.KubeDescribe("HostPath", func() {
})
// TODO consolidate common code of this test and above
It("should support existing single file subPath [sig-storage]", func() {
It("should support existing single file subPath", func() {
framework.SkipUnlessSSHKeyPresent()
subPath := "sub-path-test-file"

View File

@ -31,7 +31,7 @@ import (
. "github.com/onsi/gomega"
)
var _ = framework.KubeDescribe("Projected", func() {
var _ = Describe("[sig-storage] Projected", func() {
// Part 1/3 - Secrets
f := framework.NewDefaultFramework("projected")
@ -39,7 +39,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Testname: projected-secret-no-defaultMode
Description: Simple projected Secret test with no defaultMode set.
*/
framework.ConformanceIt("should be consumable from pods in volume [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume", func() {
doProjectedSecretE2EWithoutMapping(f, nil /* default mode */, "projected-secret-test-"+string(uuid.NewUUID()), nil, nil)
})
@ -47,7 +47,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Testname: projected-secret-with-defaultMode
Description: Simple projected Secret test with defaultMode set.
*/
framework.ConformanceIt("should be consumable from pods in volume with defaultMode set [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with defaultMode set", func() {
defaultMode := int32(0400)
doProjectedSecretE2EWithoutMapping(f, &defaultMode, "projected-secret-test-"+string(uuid.NewUUID()), nil, nil)
})
@ -57,7 +57,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Simple projected Secret test as non-root with
defaultMode and fsGroup set.
*/
framework.ConformanceIt("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume as non-root with defaultMode and fsGroup set", func() {
defaultMode := int32(0440) /* setting fsGroup sets mode to at least 440 */
fsGroup := int64(1001)
uid := int64(1000)
@ -70,7 +70,7 @@ var _ = framework.KubeDescribe("Projected", func() {
mounting it to a volume with a custom path (mapping) on the pod with
no other settings and make sure the pod actually consumes it.
*/
framework.ConformanceIt("should be consumable from pods in volume with mappings [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings", func() {
doProjectedSecretE2EWithMapping(f, nil)
})
@ -79,12 +79,12 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Repeat the projected-secret-simple-mapped but this time
with an item mode (e.g. 0400) for the secret map item.
*/
framework.ConformanceIt("should be consumable from pods in volume with mappings and Item Mode set [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings and Item Mode set", func() {
mode := int32(0400)
doProjectedSecretE2EWithMapping(f, &mode)
})
It("should be able to mount in a volume regardless of a different secret existing with same name in different namespace [sig-storage]", func() {
It("should be able to mount in a volume regardless of a different secret existing with same name in different namespace", func() {
var (
namespace2 *v1.Namespace
err error
@ -110,7 +110,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Make sure secrets works when mounted as two different
volumes on the same node.
*/
framework.ConformanceIt("should be consumable in multiple volumes in a pod [sig-storage]", func() {
framework.ConformanceIt("should be consumable in multiple volumes in a pod", func() {
// This test ensures that the same secret can be mounted in multiple
// volumes in the same pod. This test case exists to prevent
// regressions that break this use-case.
@ -203,7 +203,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Testname: projected-secret-simple-optional
Description: Make sure secrets works when optional updates included.
*/
framework.ConformanceIt("optional updates should be reflected in volume [sig-storage]", func() {
framework.ConformanceIt("optional updates should be reflected in volume", func() {
podLogTimeout := framework.GetPodSecretUpdateTimeout(f.ClientSet)
containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds()))
trueVal := true
@ -405,7 +405,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Make sure that a projected volume with a configMap with
no mappings succeeds properly.
*/
framework.ConformanceIt("should be consumable from pods in volume [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume", func() {
doProjectedConfigMapE2EWithoutMappings(f, 0, 0, nil)
})
@ -414,12 +414,12 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Make sure that a projected volume configMap is consumable
with defaultMode set.
*/
framework.ConformanceIt("should be consumable from pods in volume with defaultMode set [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with defaultMode set", func() {
defaultMode := int32(0400)
doProjectedConfigMapE2EWithoutMappings(f, 0, 0, &defaultMode)
})
It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [Feature:FSGroup] [sig-storage]", func() {
It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [Feature:FSGroup]", func() {
defaultMode := int32(0440) /* setting fsGroup sets mode to at least 440 */
doProjectedConfigMapE2EWithoutMappings(f, 1000, 1001, &defaultMode)
})
@ -429,11 +429,11 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Make sure that a projected volume configMap is consumable
by a non-root userID.
*/
framework.ConformanceIt("should be consumable from pods in volume as non-root [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume as non-root", func() {
doProjectedConfigMapE2EWithoutMappings(f, 1000, 0, nil)
})
It("should be consumable from pods in volume as non-root with FSGroup [Feature:FSGroup] [sig-storage]", func() {
It("should be consumable from pods in volume as non-root with FSGroup [Feature:FSGroup]", func() {
doProjectedConfigMapE2EWithoutMappings(f, 1000, 1001, nil)
})
@ -443,7 +443,7 @@ var _ = framework.KubeDescribe("Projected", func() {
map and mounting it to a volume with a custom path (mapping) on the
pod with no other settings and make sure the pod actually consumes it.
*/
framework.ConformanceIt("should be consumable from pods in volume with mappings [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings", func() {
doProjectedConfigMapE2EWithMappings(f, 0, 0, nil)
})
@ -452,7 +452,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Repeat the projected-secret-simple-mapped but this time
with an item mode (e.g. 0400) for the secret map item
*/
framework.ConformanceIt("should be consumable from pods in volume with mappings and Item mode set [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings and Item mode set", func() {
mode := int32(0400)
doProjectedConfigMapE2EWithMappings(f, 0, 0, &mode)
})
@ -462,11 +462,11 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Repeat the projected-config-map-simple-mapped but this
time with a user other than root.
*/
framework.ConformanceIt("should be consumable from pods in volume with mappings as non-root [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings as non-root", func() {
doProjectedConfigMapE2EWithMappings(f, 1000, 0, nil)
})
It("should be consumable from pods in volume with mappings as non-root with FSGroup [Feature:FSGroup] [sig-storage]", func() {
It("should be consumable from pods in volume with mappings as non-root with FSGroup [Feature:FSGroup]", func() {
doProjectedConfigMapE2EWithMappings(f, 1000, 1001, nil)
})
@ -476,7 +476,7 @@ var _ = framework.KubeDescribe("Projected", func() {
that the values in these configMaps can be updated, deleted,
and created.
*/
framework.ConformanceIt("updates should be reflected in volume [sig-storage]", func() {
framework.ConformanceIt("updates should be reflected in volume", func() {
podLogTimeout := framework.GetPodSecretUpdateTimeout(f.ClientSet)
containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds()))
@ -565,7 +565,7 @@ var _ = framework.KubeDescribe("Projected", func() {
configMaps, that the values in these configMaps can be updated,
deleted, and created.
*/
framework.ConformanceIt("optional updates should be reflected in volume [sig-storage]", func() {
framework.ConformanceIt("optional updates should be reflected in volume", func() {
podLogTimeout := framework.GetPodSecretUpdateTimeout(f.ClientSet)
containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds()))
trueVal := true
@ -766,7 +766,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Make sure config map works when it mounted as two
different volumes on the same node.
*/
framework.ConformanceIt("should be consumable in multiple volumes in the same pod [sig-storage]", func() {
framework.ConformanceIt("should be consumable in multiple volumes in the same pod", func() {
var (
name = "projected-configmap-test-volume-" + string(uuid.NewUUID())
volumeName = "projected-configmap-volume"
@ -864,7 +864,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Ensure that downward API can provide pod's name through
DownwardAPIVolumeFiles in a projected volume.
*/
framework.ConformanceIt("should provide podname only [sig-storage]", func() {
framework.ConformanceIt("should provide podname only", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumePodForSimpleTest(podName, "/etc/podname")
@ -879,7 +879,7 @@ var _ = framework.KubeDescribe("Projected", func() {
mode for DownwardAPIVolumeFiles if no mode is specified in a projected
volume.
*/
framework.ConformanceIt("should set DefaultMode on files [sig-storage]", func() {
framework.ConformanceIt("should set DefaultMode on files", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
defaultMode := int32(0400)
pod := projectedDownwardAPIVolumePodForModeTest(podName, "/etc/podname", nil, &defaultMode)
@ -894,7 +894,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Ensure that downward API can set file premission mode for
DownwardAPIVolumeFiles in a projected volume.
*/
framework.ConformanceIt("should set mode on item file [sig-storage]", func() {
framework.ConformanceIt("should set mode on item file", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
mode := int32(0400)
pod := projectedDownwardAPIVolumePodForModeTest(podName, "/etc/podname", &mode, nil)
@ -904,7 +904,7 @@ var _ = framework.KubeDescribe("Projected", func() {
})
})
It("should provide podname as non-root with fsgroup [Feature:FSGroup] [sig-storage]", func() {
It("should provide podname as non-root with fsgroup [Feature:FSGroup]", func() {
podName := "metadata-volume-" + string(uuid.NewUUID())
uid := int64(1001)
gid := int64(1234)
@ -918,7 +918,7 @@ var _ = framework.KubeDescribe("Projected", func() {
})
})
It("should provide podname as non-root with fsgroup and defaultMode [Feature:FSGroup] [sig-storage]", func() {
It("should provide podname as non-root with fsgroup and defaultMode [Feature:FSGroup]", func() {
podName := "metadata-volume-" + string(uuid.NewUUID())
uid := int64(1001)
gid := int64(1234)
@ -939,7 +939,7 @@ var _ = framework.KubeDescribe("Projected", func() {
DownwardAPIVolumeFiles when pod's labels get modified in a projected
volume.
*/
framework.ConformanceIt("should update labels on modification [sig-storage]", func() {
framework.ConformanceIt("should update labels on modification", func() {
labels := map[string]string{}
labels["key1"] = "value1"
labels["key2"] = "value2"
@ -972,7 +972,7 @@ var _ = framework.KubeDescribe("Projected", func() {
DownwardAPIVolumeFiles when pod's annotations get modified in a
projected volume.
*/
framework.ConformanceIt("should update annotations on modification [sig-storage]", func() {
framework.ConformanceIt("should update annotations on modification", func() {
annotations := map[string]string{}
annotations["builder"] = "bar"
podName := "annotationupdate" + string(uuid.NewUUID())
@ -1006,7 +1006,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Ensure that downward API can provide container's CPU
limit through DownwardAPIVolumeFiles in a projected volume.
*/
framework.ConformanceIt("should provide container's cpu limit [sig-storage]", func() {
framework.ConformanceIt("should provide container's cpu limit", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/cpu_limit")
@ -1020,7 +1020,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Ensure that downward API can provide container's memory
limit through DownwardAPIVolumeFiles in a projected volume.
*/
framework.ConformanceIt("should provide container's memory limit [sig-storage]", func() {
framework.ConformanceIt("should provide container's memory limit", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/memory_limit")
@ -1034,7 +1034,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Ensure that downward API can provide container's CPU
request through DownwardAPIVolumeFiles in a projected volume.
*/
framework.ConformanceIt("should provide container's cpu request [sig-storage]", func() {
framework.ConformanceIt("should provide container's cpu request", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/cpu_request")
@ -1048,7 +1048,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Ensure that downward API can provide container's memory
request through DownwardAPIVolumeFiles in a projected volume.
*/
framework.ConformanceIt("should provide container's memory request [sig-storage]", func() {
framework.ConformanceIt("should provide container's memory request", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/memory_request")
@ -1063,7 +1063,7 @@ var _ = framework.KubeDescribe("Projected", func() {
allocatable value for CPU through DownwardAPIVolumeFiles if CPU limit
is not specified for a container in a projected volume.
*/
framework.ConformanceIt("should provide node allocatable (cpu) as default cpu limit if the limit is not set [sig-storage]", func() {
framework.ConformanceIt("should provide node allocatable (cpu) as default cpu limit if the limit is not set", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForDefaultContainerResources(podName, "/etc/cpu_limit")
@ -1076,7 +1076,7 @@ var _ = framework.KubeDescribe("Projected", func() {
allocatable value for memory through DownwardAPIVolumeFiles if memory
limit is not specified for a container in a projected volume.
*/
framework.ConformanceIt("should provide node allocatable (memory) as default memory limit if the limit is not set [sig-storage]", func() {
framework.ConformanceIt("should provide node allocatable (memory) as default memory limit if the limit is not set", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForDefaultContainerResources(podName, "/etc/memory_limit")
@ -1089,7 +1089,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: This test projects a secret and configmap into the same
directory to ensure projection is working as intended.
*/
framework.ConformanceIt("should project all components that make up the projection API [sig-storage] [Projection]", func() {
framework.ConformanceIt("should project all components that make up the projection API [Projection]", func() {
var err error
podName := "projected-volume-" + string(uuid.NewUUID())
secretName := "secret-projected-all-test-volume-" + string(uuid.NewUUID())