Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part 2: Promoting Atomic Writer testcases for Conformance #66871

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/conformance/testdata/conformance.txt
Expand Up @@ -167,6 +167,11 @@ test/e2e/node/pre_stop.go: "should call prestop when killing a pod"
test/e2e/scheduling/predicates.go: "validates resource limits of pods that are allowed to run"
test/e2e/scheduling/predicates.go: "validates that NodeSelector is respected if not matching"
test/e2e/scheduling/predicates.go: "validates that NodeSelector is respected if matching"
test/e2e/storage/subpath.go: "should support subpaths with secret pod"
test/e2e/storage/subpath.go: "should support subpaths with configmap pod"
test/e2e/storage/subpath.go: "should support subpaths with configmap pod with mountPath of existing file"
test/e2e/storage/subpath.go: "should support subpaths with downward pod"
test/e2e/storage/subpath.go: "should support subpaths with projected pod"
test/e2e_node/kubelet_test.go: "it should print the output to logs"
test/e2e_node/kubelet_test.go: "it should not write to root filesystem"
test/e2e_node/lifecycle_hook_test.go: "should execute poststart exec hook properly"
Expand Down
35 changes: 30 additions & 5 deletions test/e2e/storage/subpath.go
Expand Up @@ -103,24 +103,44 @@ var _ = utils.SIGDescribe("Subpath", func() {

})

It("should support subpaths with secret pod", func() {
/*
Release : v1.12
Testname: SubPath: Reading content from a secret volume.
Description: Containers in a pod can read content from a secret mounted volume which was configured with a subpath.
*/
framework.ConformanceIt("should support subpaths with secret pod", func() {
pod := testPodSubpath(f, "secret-key", "secret", &v1.VolumeSource{Secret: &v1.SecretVolumeSource{SecretName: "my-secret"}}, privilegedSecurityContext)
testBasicSubpath(f, "secret-value", pod)
})

It("should support subpaths with configmap pod", func() {
/*
Release : v1.12
Testname: SubPath: Reading content from a configmap volume.
Description: Containers in a pod can read content from a configmap mounted volume which was configured with a subpath.
*/
framework.ConformanceIt("should support subpaths with configmap pod", func() {
pod := testPodSubpath(f, "configmap-key", "configmap", &v1.VolumeSource{ConfigMap: &v1.ConfigMapVolumeSource{LocalObjectReference: v1.LocalObjectReference{Name: "my-configmap"}}}, privilegedSecurityContext)
testBasicSubpath(f, "configmap-value", pod)
})

It("should support subpaths with configmap pod with mountPath of existing file", func() {
/*
Release : v1.12
Testname: SubPath: Reading content from a configmap volume.
Description: Containers in a pod can read content from a configmap mounted volume which was configured with a subpath and also using a mountpath that is a specific file.
*/
framework.ConformanceIt("should support subpaths with configmap pod with mountPath of existing file", func() {
pod := testPodSubpath(f, "configmap-key", "configmap", &v1.VolumeSource{ConfigMap: &v1.ConfigMapVolumeSource{LocalObjectReference: v1.LocalObjectReference{Name: "my-configmap"}}}, privilegedSecurityContext)
file := "/etc/resolv.conf"
pod.Spec.Containers[0].VolumeMounts[0].MountPath = file
testBasicSubpathFile(f, "configmap-value", pod, file)
})

It("should support subpaths with downward pod", func() {
/*
Release : v1.12
Testname: SubPath: Reading content from a downwardAPI volume.
Description: Containers in a pod can read content from a downwardAPI mounted volume which was configured with a subpath.
*/
framework.ConformanceIt("should support subpaths with downward pod", func() {
pod := testPodSubpath(f, "downward/podname", "downwardAPI", &v1.VolumeSource{
DownwardAPI: &v1.DownwardAPIVolumeSource{
Items: []v1.DownwardAPIVolumeFile{{Path: "downward/podname", FieldRef: &v1.ObjectFieldSelector{APIVersion: "v1", FieldPath: "metadata.name"}}},
Expand All @@ -129,7 +149,12 @@ var _ = utils.SIGDescribe("Subpath", func() {
testBasicSubpath(f, pod.Name, pod)
})

It("should support subpaths with projected pod", func() {
/*
Release : v1.12
Testname: SubPath: Reading content from a projected volume.
Description: Containers in a pod can read content from a projected mounted volume which was configured with a subpath.
*/
framework.ConformanceIt("should support subpaths with projected pod", func() {
pod := testPodSubpath(f, "projected/configmap-key", "projected", &v1.VolumeSource{
Projected: &v1.ProjectedVolumeSource{
Sources: []v1.VolumeProjection{
Expand Down