mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
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:
commit
4855b78c33
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user