summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorAdrian Reber <areber@redhat.com>2019-06-21 11:31:38 +0000
committerAdrian Reber <areber@redhat.com>2019-06-21 13:37:04 +0200
commit1e706a021dde7566bc04a27b29411d4cd940ac17 (patch)
tree7b5b04bd4b7eaa57749210eca5aaabb42881c656 /test/e2e
parentf446ccf0b050f5577328e5ba3efcdb5cafaae254 (diff)
downloadpodman-1e706a021dde7566bc04a27b29411d4cd940ac17.tar.gz
podman-1e706a021dde7566bc04a27b29411d4cd940ac17.tar.bz2
podman-1e706a021dde7566bc04a27b29411d4cd940ac17.zip
Add --latest, -l to 'podman diff'
The man page of 'podman diff' claims that the diff sub-command knows about --latest, -l. This adds support, as described in the man-page, to the diff sub-command for --latest, -l. Signed-off-by: Adrian Reber <areber@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/diff_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/e2e/diff_test.go b/test/e2e/diff_test.go
index 0f53d9bc8..d273f9463 100644
--- a/test/e2e/diff_test.go
+++ b/test/e2e/diff_test.go
@@ -80,4 +80,18 @@ var _ = Describe("Podman diff", func() {
sort.Strings(imageDiff)
Expect(imageDiff).To(Equal(containerDiff))
})
+
+ It("podman diff latest container", func() {
+ SkipIfRemote()
+ session := podmanTest.Podman([]string{"run", "--name=diff-test", ALPINE, "touch", "/tmp/diff-test"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ session = podmanTest.Podman([]string{"diff", "-l"})
+ session.WaitWithDefaultTimeout()
+ containerDiff := session.OutputToStringArray()
+ sort.Strings(containerDiff)
+ Expect(session.LineInOutputContains("C /tmp")).To(BeTrue())
+ Expect(session.LineInOutputContains("A /tmp/diff-test")).To(BeTrue())
+ Expect(session.ExitCode()).To(Equal(0))
+ })
})