Skip to content

Commit

Permalink
Merge pull request kubernetes#68886 from mgdevstack/master-emptydir-w…
Browse files Browse the repository at this point in the history
…rapper

Promote emptyDir wrapper volumes tests to Conformance
  • Loading branch information
k8s-ci-robot authored Sep 27, 2018
2 parents 08ed163 + b994279 commit 1e4edac
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
2 changes: 2 additions & 0 deletions test/conformance/testdata/conformance.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,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"
Expand Down
28 changes: 21 additions & 7 deletions test/e2e/storage/empty_dir_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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"
Expand Down Expand Up @@ -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)
Expand All @@ -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()
Expand Down

0 comments on commit 1e4edac

Please sign in to comment.