Merge pull request #71550 from pontiyaraja/privileged_disable

Removed privileged option for the test case [sig-storage] should give a volume the correct mode test case
This commit is contained in:
Kubernetes Prow Robot 2018-12-01 06:34:53 -08:00 committed by GitHub
commit 4855b78c33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,7 @@ var _ = Describe("[sig-storage] HostPath", func() {
source := &v1.HostPathVolumeSource{
Path: "/tmp",
}
pod := testPodWithHostVol(volumePath, source)
pod := testPodWithHostVol(volumePath, source, false)
pod.Spec.Containers[0].Args = []string{
fmt.Sprintf("--fs_type=%v", volumePath),
@ -67,7 +67,7 @@ var _ = Describe("[sig-storage] HostPath", func() {
source := &v1.HostPathVolumeSource{
Path: "/tmp",
}
pod := testPodWithHostVol(volumePath, source)
pod := testPodWithHostVol(volumePath, source, true)
pod.Spec.Containers[0].Args = []string{
fmt.Sprintf("--new_file_0644=%v", filePath),
@ -96,7 +96,7 @@ var _ = Describe("[sig-storage] HostPath", func() {
source := &v1.HostPathVolumeSource{
Path: "/tmp",
}
pod := testPodWithHostVol(volumePath, source)
pod := testPodWithHostVol(volumePath, source, true)
// Write the file in the subPath from container 0
container := &pod.Spec.Containers[0]
@ -135,9 +135,8 @@ func mount(source *v1.HostPathVolumeSource) []v1.Volume {
}
//TODO: To merge this with the emptyDir tests, we can make source a lambda.
func testPodWithHostVol(path string, source *v1.HostPathVolumeSource) *v1.Pod {
func testPodWithHostVol(path string, source *v1.HostPathVolumeSource, privileged bool) *v1.Pod {
podName := "pod-host-path-test"
privileged := true
return &v1.Pod{
TypeMeta: metav1.TypeMeta{