From b9942796dbe8dddf967e4d1865ae19609a555b12 Mon Sep 17 00:00:00 2001 From: Mayank Gaikwad <8110509+mgdevstack@users.noreply.github.com> Date: Mon, 24 Sep 2018 15:39:20 +0530 Subject: [PATCH] Promote emptyDir wrapper volume tests to conformance --- test/conformance/testdata/conformance.txt | 2 ++ test/e2e/storage/empty_dir_wrapper.go | 28 +++++++++++++++++------ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/test/conformance/testdata/conformance.txt b/test/conformance/testdata/conformance.txt index 4fd04cd1530..0daed55f08b 100755 --- a/test/conformance/testdata/conformance.txt +++ b/test/conformance/testdata/conformance.txt @@ -182,6 +182,8 @@ 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/empty_dir_wrapper.go: "should not conflict" +test/e2e/storage/empty_dir_wrapper.go: "should not cause race condition when used for configmaps" 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" diff --git a/test/e2e/storage/empty_dir_wrapper.go b/test/e2e/storage/empty_dir_wrapper.go index e977d74f7d5..845ce1c7cde 100644 --- a/test/e2e/storage/empty_dir_wrapper.go +++ b/test/e2e/storage/empty_dir_wrapper.go @@ -17,21 +17,20 @@ limitations under the License. package storage import ( + "fmt" + "strconv" + "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" + "k8s.io/kubernetes/test/e2e/storage/utils" imageutils "k8s.io/kubernetes/test/utils/image" - "fmt" - "strconv" - . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - - "k8s.io/kubernetes/test/e2e/storage/utils" ) const ( @@ -56,7 +55,12 @@ const ( var _ = utils.SIGDescribe("EmptyDir wrapper volumes", func() { f := framework.NewDefaultFramework("emptydir-wrapper") - It("should not conflict", func() { + /* + Release : v1.13 + Testname: EmptyDir Wrapper Volume, Secret and ConfigMap volumes, no conflict + Description: Secret volume and ConfigMap volume is created with data. Pod MUST be able to start with Secret and ConfigMap volumes mounted into the container. + */ + framework.ConformanceIt("should not conflict", func() { name := "emptydir-wrapper-test-" + string(uuid.NewUUID()) volumeName := "secret-volume" volumeMountPath := "/etc/secret-volume" @@ -172,7 +176,13 @@ var _ = utils.SIGDescribe("EmptyDir wrapper volumes", func() { // but these cases are harder because tmpfs-based emptyDir // appears to be less prone to the race problem. - It("should not cause race condition when used for configmaps [Serial] [Slow]", func() { + /* + Release : v1.13 + Testname: EmptyDir Wrapper Volume, ConfigMap volumes, no race + Description: Slow by design [~180 Seconds]. + Create 50 ConfigMaps Volumes and 5 replicas of pod with these ConfigMapvolumes mounted. Pod MUST NOT fail waiting for Volumes. + */ + framework.ConformanceIt("should not cause race condition when used for configmaps [Serial] [Slow]", func() { configMapNames := createConfigmapsForRace(f) defer deleteConfigMaps(f, configMapNames) volumes, volumeMounts := makeConfigMapVolumes(configMapNames) @@ -181,6 +191,10 @@ var _ = utils.SIGDescribe("EmptyDir wrapper volumes", func() { } }) + // Slow by design [~150 Seconds]. + // This test uses deprecated GitRepo VolumeSource so it MUST not be promoted to Conformance. + // To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod’s container. + // This projected volume maps approach can also be tested with secrets and downwardapi VolumeSource but are less prone to the race problem. It("should not cause race condition when used for git_repo [Serial] [Slow]", func() { gitURL, gitRepo, cleanup := createGitServer(f) defer cleanup()