aboutsummaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-05 06:42:36 -0400
committerGitHub <noreply@github.com>2020-09-05 06:42:36 -0400
commitf1323a941c7b5709197def5d10ad79ed24bbbc35 (patch)
tree3d0e1b98c20b4d5191f86b57d8197bf6daadf4f5 /test/e2e
parent6862cc667761fe3cb8dd45a3491cdca977d493cf (diff)
parentebfea2f4f89328ec3f74a8deedb3e727ce89ea59 (diff)
downloadpodman-f1323a941c7b5709197def5d10ad79ed24bbbc35.tar.gz
podman-f1323a941c7b5709197def5d10ad79ed24bbbc35.tar.bz2
podman-f1323a941c7b5709197def5d10ad79ed24bbbc35.zip
Merge pull request #7329 from Luap99/generate-systemd-remote
APIv2 add generate systemd endpoint
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/generate_systemd_test.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/e2e/generate_systemd_test.go b/test/e2e/generate_systemd_test.go
index 60d9162d1..cd3ee6e0a 100644
--- a/test/e2e/generate_systemd_test.go
+++ b/test/e2e/generate_systemd_test.go
@@ -1,5 +1,3 @@
-// +build !remote
-
package integration
import (
@@ -61,7 +59,7 @@ var _ = Describe("Podman generate systemd", func() {
session = podmanTest.Podman([]string{"generate", "systemd", "--restart-policy", "bogus", "foobar"})
session.WaitWithDefaultTimeout()
Expect(session).To(ExitWithError())
- found, _ := session.ErrorGrepString("Error: bogus is not a valid restart policy")
+ found, _ := session.ErrorGrepString("bogus is not a valid restart policy")
Expect(found).Should(BeTrue())
})
@@ -383,4 +381,15 @@ var _ = Describe("Podman generate systemd", func() {
found, _ = session.GrepString("pod rm --ignore -f --pod-id-file %t/pod-foo.pod-id")
Expect(found).To(BeTrue())
})
+
+ It("podman generate systemd --format json", func() {
+ n := podmanTest.Podman([]string{"create", "--name", "foo", ALPINE})
+ n.WaitWithDefaultTimeout()
+ Expect(n.ExitCode()).To(Equal(0))
+
+ session := podmanTest.Podman([]string{"generate", "systemd", "--format", "json", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.IsJSONOutputValid()).To(BeTrue())
+ })
})