diff options
author | Joseph Gooch <mrwizard@dok.org> | 2020-06-16 14:57:43 +0000 |
---|---|---|
committer | Joseph Gooch <mrwizard@dok.org> | 2020-06-16 17:37:39 +0000 |
commit | eb8bfdad3e6e4f3bbb308c2ae8c8b6dbba7d4f1c (patch) | |
tree | cac643da5385b06261a361a8d32614de65243955 /test | |
parent | 0968f25988624699f2db559f0a984cf84c8a284f (diff) | |
download | podman-eb8bfdad3e6e4f3bbb308c2ae8c8b6dbba7d4f1c.tar.gz podman-eb8bfdad3e6e4f3bbb308c2ae8c8b6dbba7d4f1c.tar.bz2 podman-eb8bfdad3e6e4f3bbb308c2ae8c8b6dbba7d4f1c.zip |
Fix --init and --init-path
Init properly passed into specgen
Allow --init with --systemd=true but not --systemd=always.
Signed-off-by: Joseph Gooch <mrwizard@dok.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/run_test.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 76944b3db..6dce0b48d 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -151,12 +151,36 @@ var _ = Describe("Podman run", func() { session := podmanTest.Podman([]string{"run", "--init", ALPINE, "ls"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) + result := podmanTest.Podman([]string{"inspect", "-l"}) + result.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + conData := result.InspectContainerToJSON() + Expect(conData[0].Path).To(Equal("/dev/init")) + Expect(conData[0].Config.Annotations["io.podman.annotations.init"]).To(Equal("TRUE")) }) It("podman run a container with --init and --init-path", func() { session := podmanTest.Podman([]string{"run", "--init", "--init-path", "/usr/libexec/podman/catatonit", ALPINE, "ls"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) + result := podmanTest.Podman([]string{"inspect", "-l"}) + result.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + conData := result.InspectContainerToJSON() + Expect(conData[0].Path).To(Equal("/dev/init")) + Expect(conData[0].Config.Annotations["io.podman.annotations.init"]).To(Equal("TRUE")) + }) + + It("podman run a container without --init", func() { + session := podmanTest.Podman([]string{"run", ALPINE, "ls"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + result := podmanTest.Podman([]string{"inspect", "-l"}) + result.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + conData := result.InspectContainerToJSON() + Expect(conData[0].Path).To(Equal("ls")) + Expect(conData[0].Config.Annotations["io.podman.annotations.init"]).To(Equal("FALSE")) }) It("podman run seccomp test", func() { |