diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-25 00:20:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-25 00:20:25 +0200 |
commit | d8b18a98791a49f5352d6a849cef7bff136cbb2c (patch) | |
tree | 21fc7842615b30a5c6bc9cd031a7476b7a3ef313 /test/e2e | |
parent | 394e12aa656ed3d9cc0afef48f1315fff5ed5db3 (diff) | |
parent | 2d9f1e95eb00242751ff0d9655bb513c27173475 (diff) | |
download | podman-d8b18a98791a49f5352d6a849cef7bff136cbb2c.tar.gz podman-d8b18a98791a49f5352d6a849cef7bff136cbb2c.tar.bz2 podman-d8b18a98791a49f5352d6a849cef7bff136cbb2c.zip |
Merge pull request #3401 from mheon/templating_is_dumb
Fix inspect --format '{{.Mounts}}.
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/inspect_test.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go index ccd8602c4..790115133 100644 --- a/test/e2e/inspect_test.go +++ b/test/e2e/inspect_test.go @@ -107,4 +107,31 @@ var _ = Describe("Podman inspect", func() { Expect(result.ExitCode()).To(Equal(125)) }) + It("podman inspect with mount filters", func() { + SkipIfRemote() + + ctrSession := podmanTest.Podman([]string{"create", "-v", "/tmp:/test1", ALPINE, "top"}) + ctrSession.WaitWithDefaultTimeout() + Expect(ctrSession.ExitCode()).To(Equal(0)) + + inspectSource := podmanTest.Podman([]string{"inspect", "-l", "--format", "{{(index .Mounts 0).Source}}"}) + inspectSource.WaitWithDefaultTimeout() + Expect(inspectSource.ExitCode()).To(Equal(0)) + Expect(inspectSource.OutputToString()).To(Equal("/tmp")) + + inspectSrc := podmanTest.Podman([]string{"inspect", "-l", "--format", "{{(index .Mounts 0).Src}}"}) + inspectSrc.WaitWithDefaultTimeout() + Expect(inspectSrc.ExitCode()).To(Equal(0)) + Expect(inspectSrc.OutputToString()).To(Equal("/tmp")) + + inspectDestination := podmanTest.Podman([]string{"inspect", "-l", "--format", "{{(index .Mounts 0).Destination}}"}) + inspectDestination.WaitWithDefaultTimeout() + Expect(inspectDestination.ExitCode()).To(Equal(0)) + Expect(inspectDestination.OutputToString()).To(Equal("/test1")) + + inspectDst := podmanTest.Podman([]string{"inspect", "-l", "--format", "{{(index .Mounts 0).Dst}}"}) + inspectDst.WaitWithDefaultTimeout() + Expect(inspectDst.ExitCode()).To(Equal(0)) + Expect(inspectDst.OutputToString()).To(Equal("/test1")) + }) }) |