summaryrefslogtreecommitdiff
path: root/test/e2e/import_test.go
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2020-09-13 15:40:41 -0400
committerQi Wang <qiwan@redhat.com>2020-09-15 16:09:33 -0400
commit2fcd1d7b4dca2619277607da7c8d22e9ec7620a2 (patch)
tree27f44268555f587c724f9674c5ec742dbf31b089 /test/e2e/import_test.go
parent0be5836e49da38b156951639b7e19eaec6a6e593 (diff)
downloadpodman-2fcd1d7b4dca2619277607da7c8d22e9ec7620a2.tar.gz
podman-2fcd1d7b4dca2619277607da7c8d22e9ec7620a2.tar.bz2
podman-2fcd1d7b4dca2619277607da7c8d22e9ec7620a2.zip
Supports import&run--signature-policy
Enables podman create, pull, run, import to use --signature-policy option. Set it as hidden flag to be consistent with other commands. Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'test/e2e/import_test.go')
-rw-r--r--test/e2e/import_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/import_test.go b/test/e2e/import_test.go
index feedb2a31..9c6f4381d 100644
--- a/test/e2e/import_test.go
+++ b/test/e2e/import_test.go
@@ -152,4 +152,21 @@ var _ = Describe("Podman import", func() {
Expect(imageData[0].Config.Cmd[0]).To(Equal("/bin/bash"))
})
+ It("podman import with signature", func() {
+ outfile := filepath.Join(podmanTest.TempDir, "container.tar")
+ _, ec, cid := podmanTest.RunLsContainer("")
+ Expect(ec).To(Equal(0))
+
+ export := podmanTest.Podman([]string{"export", "-o", outfile, cid})
+ export.WaitWithDefaultTimeout()
+ Expect(export.ExitCode()).To(Equal(0))
+
+ importImage := podmanTest.Podman([]string{"import", "--signature-policy", "/no/such/file", outfile})
+ importImage.WaitWithDefaultTimeout()
+ Expect(importImage.ExitCode()).To(Not(Equal(0)))
+
+ result := podmanTest.Podman([]string{"import", "--signature-policy", "/etc/containers/policy.json", outfile})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ })
})