From c236aebb9beec275cdde8d0d1db48bdb532544f3 Mon Sep 17 00:00:00 2001 From: Jakub Guzik Date: Mon, 22 Feb 2021 00:25:45 +0100 Subject: Two variations of --new flag added to e2e Signed-off-by: Jakub Guzik --- test/e2e/generate_systemd_test.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'test/e2e') 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() { -- cgit v1.2.3-54-g00ecf