summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/e2e/rootless_test.go17
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)
}