summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-06-23 17:03:06 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-06-24 09:26:03 -0400
commitde75b1a2778fa08d50ecf573b3259b32b68912d7 (patch)
tree80c54e3505aae05db2c1acf4468fcc024ff6a3f5 /test/e2e
parentb611ac1c50184827fa0be04a8de800e09b802705 (diff)
downloadpodman-de75b1a2778fa08d50ecf573b3259b32b68912d7.tar.gz
podman-de75b1a2778fa08d50ecf573b3259b32b68912d7.tar.bz2
podman-de75b1a2778fa08d50ecf573b3259b32b68912d7.zip
Fix a segfault in 'podman ps --sync'
We weren't properly populating the container's OCI Runtime in Batch(), causing segfaults on attempting to access it. Add a test to make sure we actually catch cases like this in the future. Fixes #3411 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/ps_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go
index b0a28501a..2b86f663f 100644
--- a/test/e2e/ps_test.go
+++ b/test/e2e/ps_test.go
@@ -320,4 +320,16 @@ var _ = Describe("Podman ps", func() {
session.WaitWithDefaultTimeout()
Expect(session.OutputToString()).To(ContainSubstring("0.0.0.0:1000-1006"))
})
+
+ It("podman ps sync flag", func() {
+ session := podmanTest.RunTopContainer("")
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ fullCid := session.OutputToString()
+
+ result := podmanTest.Podman([]string{"ps", "-q", "--no-trunc", "--sync"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ Expect(result.OutputToStringArray()[0]).To(Equal(fullCid))
+ })
})