diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-12-21 06:09:45 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-21 06:09:45 -0800 |
commit | faa7ff3568a6cdc52caa99dfa88b656818574fdc (patch) | |
tree | 7d1e1382bc74cf4bdbac3b5b60b3a70bd84fd68e /test | |
parent | 28e30408b6f6088545421e0cfb8ca3e05d1cdc06 (diff) | |
parent | 0ed55f75abac1311b61a17079ae9314ec5459bfd (diff) | |
download | podman-faa7ff3568a6cdc52caa99dfa88b656818574fdc.tar.gz podman-faa7ff3568a6cdc52caa99dfa88b656818574fdc.tar.bz2 podman-faa7ff3568a6cdc52caa99dfa88b656818574fdc.zip |
Merge pull request #2028 from giuseppe/fix-rootless-export
rootless: fix export when using fuse-overlayfs
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/rootless_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/rootless_test.go b/test/e2e/rootless_test.go index 037af9688..5a7f0359a 100644 --- a/test/e2e/rootless_test.go +++ b/test/e2e/rootless_test.go @@ -7,6 +7,7 @@ import ( "os/exec" "path/filepath" "runtime" + "strings" "syscall" . "github.com/containers/libpod/test/utils" @@ -245,6 +246,22 @@ var _ = Describe("Podman rootless", func() { cmd.WaitWithDefaultTimeout() Expect(cmd.ExitCode()).To(Equal(0)) Expect(cmd.LineInOutputContains("hello")).To(BeTrue()) + + cmd = rootlessTest.PodmanAsUser([]string{"ps", "-l", "-q"}, 1000, 1000, env) + cmd.WaitWithDefaultTimeout() + Expect(cmd.ExitCode()).To(Equal(0)) + cid := cmd.OutputToString() + + cmd = rootlessTest.PodmanAsUser([]string{"exec", "-l", "sh", "-c", "echo SeCreTMessage > /file"}, 1000, 1000, env) + cmd.WaitWithDefaultTimeout() + Expect(cmd.ExitCode()).To(Equal(0)) + + path := filepath.Join(home, "export.tar") + cmd = rootlessTest.PodmanAsUser([]string{"export", "-o", path, cid}, 1000, 1000, env) + cmd.WaitWithDefaultTimeout() + content, err := ioutil.ReadFile(path) + Expect(err).To(BeNil()) + Expect(strings.Contains(string(content), "SeCreTMessage")).To(BeTrue()) } runInRootlessContext(f) } |