aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-22 05:44:33 -0500
committerGitHub <noreply@github.com>2021-02-22 05:44:33 -0500
commit37438f7e8dc214a99f542f0be86d349f6379c29b (patch)
tree957cfc22c776b730bdeeee1b94d1dc825d789f35
parent4a6582bd86572f0336c82577a0a4f315376c7179 (diff)
parentc236aebb9beec275cdde8d0d1db48bdb532544f3 (diff)
downloadpodman-37438f7e8dc214a99f542f0be86d349f6379c29b.tar.gz
podman-37438f7e8dc214a99f542f0be86d349f6379c29b.tar.bz2
podman-37438f7e8dc214a99f542f0be86d349f6379c29b.zip
Merge pull request #9458 from jmguzik/podman-systemd-generate-new-e2e
Two usage variations of --new flag added to e2e
-rw-r--r--test/e2e/generate_systemd_test.go23
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() {