diff options
author | Jakub Guzik <jakubmguzik@gmail.com> | 2021-02-22 00:25:45 +0100 |
---|---|---|
committer | Jakub Guzik <jakubmguzik@gmail.com> | 2021-02-22 09:53:42 +0100 |
commit | c236aebb9beec275cdde8d0d1db48bdb532544f3 (patch) | |
tree | 957cfc22c776b730bdeeee1b94d1dc825d789f35 /test | |
parent | 4a6582bd86572f0336c82577a0a4f315376c7179 (diff) | |
download | podman-c236aebb9beec275cdde8d0d1db48bdb532544f3.tar.gz podman-c236aebb9beec275cdde8d0d1db48bdb532544f3.tar.bz2 podman-c236aebb9beec275cdde8d0d1db48bdb532544f3.zip |
Two variations of --new flag added to e2e
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/generate_systemd_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/e2e/generate_systemd_test.go b/test/e2e/generate_systemd_test.go index 606d756b0..3258ccbe7 100644 --- a/test/e2e/generate_systemd_test.go +++ b/test/e2e/generate_systemd_test.go @@ -235,6 +235,29 @@ var _ = Describe("Podman generate systemd", func() { session := podmanTest.Podman([]string{"generate", "systemd", "--time", "42", "--name", "--new", "foo"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(ContainSubstring(" pod create ")) + }) + + It("podman generate systemd --new=false pod", func() { + n := podmanTest.Podman([]string{"pod", "create", "--name", "foo"}) + n.WaitWithDefaultTimeout() + Expect(n.ExitCode()).To(Equal(0)) + + session := podmanTest.Podman([]string{"generate", "systemd", "--time", "42", "--name", "--new=false", "foo"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).NotTo(ContainSubstring(" pod create ")) + }) + + It("podman generate systemd --new=true pod", func() { + n := podmanTest.Podman([]string{"pod", "create", "--name", "foo"}) + n.WaitWithDefaultTimeout() + Expect(n.ExitCode()).To(Equal(0)) + + session := podmanTest.Podman([]string{"generate", "systemd", "--time", "42", "--name", "--new=true", "foo"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(ContainSubstring(" pod create ")) }) It("podman generate systemd --container-prefix con", func() { |