Skip to content

Commit

Permalink
Merge pull request #2698 from debarshiray/wip/rishi/podman-inspect-co…
Browse files Browse the repository at this point in the history
…nmon-pid-file

Export ConmonPidFile in 'podman inspect' for containers
  • Loading branch information
openshift-merge-robot authored Mar 18, 2019
2 parents 7ed8366 + 022bb95 commit 8afe02f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions libpod/container_inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions pkg/inspect/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
10 changes: 10 additions & 0 deletions test/e2e/inspect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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("")
Expand Down

0 comments on commit 8afe02f

Please sign in to comment.