Skip to content

Commit

Permalink
Merge pull request #17067 from sstosh/e2e-play-kube
Browse files Browse the repository at this point in the history
e2e: fix play_kube_test
  • Loading branch information
openshift-merge-robot authored Jan 11, 2023
2 parents 8a0d25f + a5ce3b3 commit 1e45103
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/e2e/play_kube_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3162,12 +3162,18 @@ spec:
hostPathDir := filepath.Join(tempdir, testdir)
err := os.Mkdir(hostPathDir, 0755)
Expect(err).ToNot(HaveOccurred())
defer os.RemoveAll(hostPathDir)

hostPathDirFile := filepath.Join(hostPathDir, testfile)
f, err := os.Create(hostPathDirFile)
Expect(err).ToNot(HaveOccurred())
f.Close()

if selinux.GetEnabled() {
label := SystemExec("chcon", []string{"-t", "container_file_t", hostPathDirFile})
Expect(label).Should(Exit(0))
}

// Create container image with named volume
containerfile := fmt.Sprintf(`
FROM %s
Expand Down

0 comments on commit 1e45103

Please sign in to comment.