summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-01-29 11:47:20 -0500
committerGitHub <noreply@github.com>2021-01-29 11:47:20 -0500
commit0fe3d43ef1c6dce6ae931aba53dc68d80e42e4da (patch)
treef93633b4041ec7cacad2ff1380e987f5c9dd6265 /test/e2e
parent0c6a889a7ec93964a12a10870920727e13e438c3 (diff)
parent59076888d9013fdfa4800b3fe61e008abf5e61e9 (diff)
downloadpodman-0fe3d43ef1c6dce6ae931aba53dc68d80e42e4da.tar.gz
podman-0fe3d43ef1c6dce6ae931aba53dc68d80e42e4da.tar.bz2
podman-0fe3d43ef1c6dce6ae931aba53dc68d80e42e4da.zip
Merge pull request #9133 from rhatdan/pull1
Cleanup bindings for image pull
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/pull_test.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go
index 4b73004da..d47a3e47a 100644
--- a/test/e2e/pull_test.go
+++ b/test/e2e/pull_test.go
@@ -522,4 +522,31 @@ var _ = Describe("Podman pull", func() {
Expect(data[0].Os).To(Equal(runtime.GOOS))
Expect(data[0].Architecture).To(Equal("arm64"))
})
+
+ It("podman pull --arch", func() {
+ session := podmanTest.Podman([]string{"pull", "--arch=bogus", ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(125))
+ expectedError := "no image found in manifest list for architecture bogus"
+ Expect(session.ErrorToString()).To(ContainSubstring(expectedError))
+
+ session = podmanTest.Podman([]string{"pull", "--arch=arm64", "--os", "windows", ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(125))
+ expectedError = "no image found in manifest list for architecture"
+ Expect(session.ErrorToString()).To(ContainSubstring(expectedError))
+
+ session = podmanTest.Podman([]string{"pull", "-q", "--arch=arm64", ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ setup := podmanTest.Podman([]string{"image", "inspect", session.OutputToString()})
+ setup.WaitWithDefaultTimeout()
+ Expect(setup.ExitCode()).To(Equal(0))
+
+ data := setup.InspectImageJSON() // returns []inspect.ImageData
+ Expect(len(data)).To(Equal(1))
+ Expect(data[0].Os).To(Equal(runtime.GOOS))
+ Expect(data[0].Architecture).To(Equal("arm64"))
+ })
})