summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/checkpoint_test.go20
-rw-r--r--test/e2e/inspect_test.go12
2 files changed, 32 insertions, 0 deletions
diff --git a/test/e2e/checkpoint_test.go b/test/e2e/checkpoint_test.go
index f208a4cf0..237223283 100644
--- a/test/e2e/checkpoint_test.go
+++ b/test/e2e/checkpoint_test.go
@@ -439,6 +439,18 @@ var _ = Describe("Podman checkpoint", func() {
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
+ result = podmanTest.Podman([]string{"exec", "-l", "/bin/sh", "-c", "rm /etc/motd"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+
+ result = podmanTest.Podman([]string{"diff", "-l"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ Expect(result.OutputToString()).To(ContainSubstring("C /etc"))
+ Expect(result.OutputToString()).To(ContainSubstring("A /test.output"))
+ Expect(result.OutputToString()).To(ContainSubstring("D /etc/motd"))
+ Expect(len(result.OutputToStringArray())).To(Equal(3))
+
// Checkpoint the container
result = podmanTest.Podman([]string{"container", "checkpoint", "-l", "-e", fileName})
result.WaitWithDefaultTimeout()
@@ -462,6 +474,14 @@ var _ = Describe("Podman checkpoint", func() {
Expect(result.ExitCode()).To(Equal(0))
Expect(result.OutputToString()).To(ContainSubstring("test" + cid + "test"))
+ result = podmanTest.Podman([]string{"diff", "-l"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ Expect(result.OutputToString()).To(ContainSubstring("C /etc"))
+ Expect(result.OutputToString()).To(ContainSubstring("A /test.output"))
+ Expect(result.OutputToString()).To(ContainSubstring("D /etc/motd"))
+ Expect(len(result.OutputToStringArray())).To(Equal(3))
+
// Remove exported checkpoint
os.Remove(fileName)
})
diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go
index 7d029c52f..2d81ef0d8 100644
--- a/test/e2e/inspect_test.go
+++ b/test/e2e/inspect_test.go
@@ -117,6 +117,18 @@ var _ = Describe("Podman inspect", func() {
Expect(len(result.OutputToStringArray())).To(Equal(1))
})
+ It("podman inspect container and filter for CreateCommand", func() {
+ SkipIfRemote()
+ ls, ec, _ := podmanTest.RunLsContainer("")
+ Expect(ec).To(Equal(0))
+ cid := ls.OutputToString()
+
+ result := podmanTest.Podman([]string{"inspect", "--format={{.Config.CreateCommand}}", cid})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ Expect(len(result.OutputToStringArray())).To(Equal(1))
+ })
+
It("podman inspect -l with additional input should fail", func() {
SkipIfRemote()
result := podmanTest.Podman([]string{"inspect", "-l", "1234foobar"})