From 1e706a021dde7566bc04a27b29411d4cd940ac17 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Fri, 21 Jun 2019 11:31:38 +0000 Subject: 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 --- test/e2e/diff_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') 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)) + }) }) -- cgit v1.2.3-54-g00ecf