summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpod/container_inspect.go1
-rw-r--r--pkg/inspect/inspect.go1
-rw-r--r--test/e2e/inspect_test.go10
3 files changed, 12 insertions, 0 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go
index a76163692..aa3a07888 100644
--- a/libpod/container_inspect.go
+++ b/libpod/container_inspect.go
@@ -93,6 +93,7 @@ func (c *Container) getContainerInspectData(size bool, driverData *inspect.Data)
HostsPath: hostsPath,
StaticDir: config.StaticDir,
LogPath: config.LogPath,
+ ConmonPidFile: config.ConmonPidFile,
Name: config.Name,
Driver: driverData.Name,
MountLabel: config.MountLabel,
diff --git a/pkg/inspect/inspect.go b/pkg/inspect/inspect.go
index 82fe37f18..270e431ad 100644
--- a/pkg/inspect/inspect.go
+++ b/pkg/inspect/inspect.go
@@ -158,6 +158,7 @@ type ContainerInspectData struct {
HostsPath string `json:"HostsPath"`
StaticDir string `json:"StaticDir"`
LogPath string `json:"LogPath"`
+ ConmonPidFile string `json:"ConmonPidFile"`
Name string `json:"Name"`
RestartCount int32 `json:"RestartCount"` //TODO
Driver string `json:"Driver"`
diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go
index ebe610e6a..34328828f 100644
--- a/test/e2e/inspect_test.go
+++ b/test/e2e/inspect_test.go
@@ -66,6 +66,16 @@ var _ = Describe("Podman inspect", func() {
Expect(session.ExitCode()).To(Equal(0))
})
+ It("podman inspect container with GO format for ConmonPidFile", func() {
+ SkipIfRemote()
+ session, ec, _ := podmanTest.RunLsContainer("test1")
+ Expect(ec).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"inspect", "--format", "{{.ConmonPidFile}}", "test1"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
It("podman inspect container with size", func() {
SkipIfRemote()
_, ec, _ := podmanTest.RunLsContainer("")