summaryrefslogtreecommitdiff
path: root/test/e2e/pull_test.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-01-27 15:40:16 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-01-27 16:11:35 -0500
commit59076888d9013fdfa4800b3fe61e008abf5e61e9 (patch)
treeeb71ef30a142bf18bdb3cc8845e46a997d46b943 /test/e2e/pull_test.go
parent9d59daa7ccaea526a1aa742fadab537e77a51330 (diff)
downloadpodman-59076888d9013fdfa4800b3fe61e008abf5e61e9.tar.gz
podman-59076888d9013fdfa4800b3fe61e008abf5e61e9.tar.bz2
podman-59076888d9013fdfa4800b3fe61e008abf5e61e9.zip
Cleanup bindings for image pull
Remove bindings that are not handled over the API. Leaving this one to not use image pull, since this would break progress handling. We should revisit this in the future. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/e2e/pull_test.go')
-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"))
+ })
})