summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-02-04 07:29:47 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-05 15:39:40 +0000
commit989f5e30627eb90a66fa06f87c40d161476395ed (patch)
tree87b4eabb2bfc27a9d4862db8063cb3cddb98bb23 /test/e2e
parent095aaaa639ab57c594bb80bfefbfaed2a2fdff92 (diff)
downloadpodman-989f5e30627eb90a66fa06f87c40d161476395ed.tar.gz
podman-989f5e30627eb90a66fa06f87c40d161476395ed.tar.bz2
podman-989f5e30627eb90a66fa06f87c40d161476395ed.zip
Pass NOTIFY_SOCKET and LISTEN_FDS env to OCI RUntime if set
In order to have sd_notify from systemd to work in containers we need to pass down the NOTIFY_SOCKET environment variable to the container. LISTEN_FDS, tells the application inside of the container to use socket activation and grab the FDS that are leaked into the container. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #271 Approved by: umohnani8
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index f364b6952..7bd42edc4 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -185,6 +185,17 @@ var _ = Describe("Podman run", func() {
Expect(session.OutputToString()).To(ContainSubstring("15"))
})
+ It("podman run notify_socket", func() {
+ sock := "/run/sock"
+ os.Setenv("NOTIFY_SOCKET", sock)
+ session := podmanTest.Podman([]string{"run", "--rm", ALPINE, "printenv", "NOTIFY_SOCKET"})
+ session.Wait(10)
+ Expect(session.ExitCode()).To(Equal(0))
+ match, _ := session.GrepString(sock)
+ Expect(match).Should(BeTrue())
+ os.Unsetenv("NOTIFY_SOCKET")
+ })
+
It("podman run log-opt", func() {
log := filepath.Join(podmanTest.TempDir, "/container.log")
session := podmanTest.Podman([]string{"run", "--rm", "--log-opt", fmt.Sprintf("path=%s", log), ALPINE, "ls"})