diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-01-12 23:13:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-12 23:13:45 +0100 |
commit | 55dd73cf5830eb44128f5b580cee3fb1e74dbea6 (patch) | |
tree | 0e7ae475004271275149b2e8ea83c9226e148d18 /test/e2e/generate_systemd_test.go | |
parent | 2d5fd7cc3718d27b35352e80c0c3296c5bb69c2f (diff) | |
parent | 816e50ba02837946afade83e3cad06dd44d213ec (diff) | |
download | podman-55dd73cf5830eb44128f5b580cee3fb1e74dbea6.tar.gz podman-55dd73cf5830eb44128f5b580cee3fb1e74dbea6.tar.bz2 podman-55dd73cf5830eb44128f5b580cee3fb1e74dbea6.zip |
Merge pull request #4823 from vrothberg/gen-systemd
podman-generate-systemd --new
Diffstat (limited to 'test/e2e/generate_systemd_test.go')
-rw-r--r-- | test/e2e/generate_systemd_test.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/e2e/generate_systemd_test.go b/test/e2e/generate_systemd_test.go index 91072b023..f0fef41a4 100644 --- a/test/e2e/generate_systemd_test.go +++ b/test/e2e/generate_systemd_test.go @@ -177,4 +177,32 @@ var _ = Describe("Podman generate systemd", func() { found, _ = session.GrepString("/container-foo-1.service") Expect(found).To(BeTrue()) }) + + It("podman generate systemd --new", func() { + n := podmanTest.Podman([]string{"create", "--name", "foo", "alpine", "top"}) + n.WaitWithDefaultTimeout() + Expect(n.ExitCode()).To(Equal(0)) + + session := podmanTest.Podman([]string{"generate", "systemd", "--timeout", "42", "--name", "--new", "foo"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + // Grepping the output (in addition to unit tests) + found, _ := session.GrepString("# container-foo.service") + Expect(found).To(BeTrue()) + + found, _ = session.GrepString("stop --cidfile /%t/%n-cid -t 42") + Expect(found).To(BeTrue()) + }) + + It("podman generate systemd --new pod", func() { + n := podmanTest.Podman([]string{"pod", "create", "--name", "foo"}) + n.WaitWithDefaultTimeout() + Expect(n.ExitCode()).To(Equal(0)) + + session := podmanTest.Podman([]string{"generate", "systemd", "--timeout", "42", "--name", "--new", "foo"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(125)) + }) + }) |