summaryrefslogtreecommitdiff
path: root/test/e2e/info_test.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-05-10 13:58:20 -0700
committerJhon Honce <jhonce@redhat.com>2021-05-10 14:13:15 -0700
commit8ad40a85d5eab3eea888708e242f32354e799822 (patch)
tree6d3bd8c09ea3eab3ba14c2b81f924684150eb89d /test/e2e/info_test.go
parent76c857704053a6c6ee1e2ed1900b549d399f967d (diff)
downloadpodman-8ad40a85d5eab3eea888708e242f32354e799822.tar.gz
podman-8ad40a85d5eab3eea888708e242f32354e799822.tar.bz2
podman-8ad40a85d5eab3eea888708e242f32354e799822.zip
Add host.serviceIsRemote to podman info results
Developers asked for a deterministic field to verify if podman is running via API or linked directly to libpod library. $ podman info --format '{{.Host.ServiceIsRemote}}' false $ podman-remote info --format '{{.Host.ServiceIsRemote}}' true $ podman --remote info --format '{{.Host.ServiceIsRemote}}' true * docs/conf.py formatted via black Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'test/e2e/info_test.go')
-rw-r--r--test/e2e/info_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/e2e/info_test.go b/test/e2e/info_test.go
index 0b112b312..60136bcc2 100644
--- a/test/e2e/info_test.go
+++ b/test/e2e/info_test.go
@@ -124,4 +124,15 @@ var _ = Describe("Podman Info", func() {
}
})
+ It("verify ServiceIsRemote", func() {
+ session := podmanTest.Podman([]string{"info", "--format", "{{.Host.ServiceIsRemote}}"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).To(Exit(0))
+
+ if podmanTest.RemoteTest {
+ Expect(session.OutputToString()).To(ContainSubstring("true"))
+ } else {
+ Expect(session.OutputToString()).To(ContainSubstring("false"))
+ }
+ })
})