summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-04-26 11:29:02 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-26 16:33:25 +0000
commit6ac8a24db4ab3e2bbc85feca2bee8cb1c868c7f6 (patch)
tree7fb44c59e3c9feae18d402dda0c899a959e61459 /test/e2e
parentd7d0e13837a0a2ce0b5432373892d28dbbfc0342 (diff)
downloadpodman-6ac8a24db4ab3e2bbc85feca2bee8cb1c868c7f6.tar.gz
podman-6ac8a24db4ab3e2bbc85feca2bee8cb1c868c7f6.tar.bz2
podman-6ac8a24db4ab3e2bbc85feca2bee8cb1c868c7f6.zip
Add --default-mounts-file hidden flag
The hidden flag is used to override the path of the default mounts file for testing purposes. Also modified the secrets pkg to allow for this override to happen. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #678 Approved by: mheon
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_test.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index cfeabe6a0..5eb21c433 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -260,7 +260,7 @@ var _ = Describe("Podman run", func() {
})
It("podman run with secrets", func() {
- containersDir := "/usr/share/containers"
+ containersDir := filepath.Join(podmanTest.TempDir, "containers")
err := os.MkdirAll(containersDir, 0755)
Expect(err).To(BeNil())
@@ -288,18 +288,15 @@ var _ = Describe("Podman run", func() {
execSession.WaitWithDefaultTimeout()
Expect(execSession.ExitCode()).To(Equal(0))
- session := podmanTest.Podman([]string{"run", "--rm", ALPINE, "cat", "/run/secrets/test.txt"})
+ session := podmanTest.Podman([]string{"--default-mounts-file=" + mountsFile, "run", "--rm", ALPINE, "cat", "/run/secrets/test.txt"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).To(Equal(secretsString))
- session = podmanTest.Podman([]string{"run", "--rm", ALPINE, "ls", "/run/secrets/mysymlink"})
+ session = podmanTest.Podman([]string{"--default-mounts-file=" + mountsFile, "run", "--rm", ALPINE, "ls", "/run/secrets/mysymlink"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).To(ContainSubstring("key.pem"))
-
- err = os.RemoveAll(containersDir)
- Expect(err).To(BeNil())
})
It("podman run with FIPS mode secrets", func() {