summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-01-06 15:26:55 -0500
committerGitHub <noreply@github.com>2021-01-06 15:26:55 -0500
commit8e4613ab0a57cf19f63d00a6426a9dee2489d3e6 (patch)
tree1a050d5573ae108b3693107b76c93b9562e73af2 /test
parent9198ed40e133fd2432ea1207008a02d4b70b99a1 (diff)
parent8f844a66d5d144eeb92870c27171dc8b35788d4f (diff)
downloadpodman-8e4613ab0a57cf19f63d00a6426a9dee2489d3e6.tar.gz
podman-8e4613ab0a57cf19f63d00a6426a9dee2489d3e6.tar.bz2
podman-8e4613ab0a57cf19f63d00a6426a9dee2489d3e6.zip
Merge pull request #8892 from mheon/fix_8886
Ensure that user-specified HOSTNAME is honored
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 4888a676b..92d7d222e 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -1415,4 +1415,12 @@ WORKDIR /madethis`
Expect(session.ExitCode()).To(Equal(0))
Expect(session.ErrorToString()).To(ContainSubstring("Trying to pull"))
})
+
+ It("podman run container with hostname and hostname environment variable", func() {
+ hostnameEnv := "test123"
+ session := podmanTest.Podman([]string{"run", "--hostname", "testctr", "--env", fmt.Sprintf("HOSTNAME=%s", hostnameEnv), ALPINE, "printenv", "HOSTNAME"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring(hostnameEnv))
+ })
})