summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-10-25 14:19:56 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2018-11-28 21:31:28 +0100
commit6e04ec783b0f2443f14e37601a51d35b09a7e84f (patch)
tree94f189a9a58072403b85011dae5edc653fbf835a /test/e2e
parent87bf117417b9a27ed38a1a50d11e1e6dc2042c3f (diff)
downloadpodman-6e04ec783b0f2443f14e37601a51d35b09a7e84f.tar.gz
podman-6e04ec783b0f2443f14e37601a51d35b09a7e84f.tar.bz2
podman-6e04ec783b0f2443f14e37601a51d35b09a7e84f.zip
test, rootless: specify USER env variable
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/rootless_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/e2e/rootless_test.go b/test/e2e/rootless_test.go
index c75910296..b15e6731b 100644
--- a/test/e2e/rootless_test.go
+++ b/test/e2e/rootless_test.go
@@ -56,6 +56,7 @@ var _ = Describe("Podman rootless", func() {
commands := []string{"help", "version"}
for _, v := range commands {
env := os.Environ()
+ env = append(env, "USER=foo")
cmd := podmanTest.PodmanAsUser([]string{v}, 1000, 1000, env)
cmd.WaitWithDefaultTimeout()
Expect(cmd.ExitCode()).To(Equal(0))
@@ -122,6 +123,7 @@ var _ = Describe("Podman rootless", func() {
env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", xdgRuntimeDir))
env = append(env, fmt.Sprintf("HOME=%s", home))
env = append(env, "PODMAN_ALLOW_SINGLE_ID_MAPPING_IN_USERNS=1")
+ env = append(env, "USER=foo")
cmd := rootlessTest.PodmanAsUser([]string{"pod", "create", "--infra=false"}, 1000, 1000, env)
cmd.WaitWithDefaultTimeout()
@@ -152,6 +154,7 @@ var _ = Describe("Podman rootless", func() {
env := os.Environ()
env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", xdgRuntimeDir))
env = append(env, fmt.Sprintf("HOME=%s", home))
+ env = append(env, "USER=foo")
cmd := podmanTest.PodmanAsUser([]string{"search", "docker.io/busybox"}, 1000, 1000, env)
cmd.WaitWithDefaultTimeout()
Expect(cmd.ExitCode()).To(Equal(0))
@@ -165,6 +168,7 @@ var _ = Describe("Podman rootless", func() {
env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", xdgRuntimeDir))
env = append(env, fmt.Sprintf("HOME=%s", home))
env = append(env, "PODMAN_ALLOW_SINGLE_ID_MAPPING_IN_USERNS=1")
+ env = append(env, "USER=foo")
allArgs := append([]string{"run"}, args...)
allArgs = append(allArgs, "--rootfs", mountPath, "echo", "hello")