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

Add SELinuxOptions to emptyDir e2e #17577

Merged
merged 1 commit into from Mar 16, 2016
Merged
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
9 changes: 6 additions & 3 deletions test/e2e/empty_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ func doTestSetgidFSGroup(f *Framework, image string, medium api.StorageMedium) {
fmt.Sprintf("--file_owner=%v", filePath),
}

pod.Spec.SecurityContext = &api.PodSecurityContext{}
fsGroup := int64(123)
pod.Spec.SecurityContext.FSGroup = &fsGroup

Expand Down Expand Up @@ -161,7 +160,7 @@ func doTestVolumeModeFSGroup(f *Framework, image string, medium api.StorageMediu
}

fsGroup := int64(1001)
pod.Spec.SecurityContext = &api.PodSecurityContext{FSGroup: &fsGroup}
pod.Spec.SecurityContext.FSGroup = &fsGroup

msg := fmt.Sprintf("emptydir volume type on %v", formatMedium(medium))
out := []string{
Expand All @@ -187,7 +186,6 @@ func doTest0644FSGroup(f *Framework, image string, medium api.StorageMedium) {
fmt.Sprintf("--file_perm=%v", filePath),
}

pod.Spec.SecurityContext = &api.PodSecurityContext{}
fsGroup := int64(123)
pod.Spec.SecurityContext.FSGroup = &fsGroup

Expand Down Expand Up @@ -330,6 +328,11 @@ func testPodWithVolume(image, path string, source *api.EmptyDirVolumeSource) *ap
},
},
},
SecurityContext: &api.PodSecurityContext{
SELinuxOptions: &api.SELinuxOptions{
Level: "s0",
},
},
RestartPolicy: api.RestartPolicyNever,
Volumes: []api.Volume{
{
Expand Down