summaryrefslogtreecommitdiff
path: root/test/e2e/run_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/run_test.go')
-rw-r--r--test/e2e/run_test.go28
1 files changed, 25 insertions, 3 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 828e92170..2aa5a78db 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -73,6 +73,28 @@ var _ = Describe("Podman run", func() {
Expect(session.OutputToString()).To(ContainSubstring("graphRootMounted=1"))
})
+ It("podman run from manifest list", func() {
+ session := podmanTest.Podman([]string{"manifest", "create", "localhost/test:latest"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ session = podmanTest.Podman([]string{"build", "-f", "build/Containerfile.with-platform", "--platform", "linux/amd64,linux/arm64", "--manifest", "localhost/test:latest"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ session = podmanTest.Podman([]string{"run", "--platform", "linux/arm64", "localhost/test", "uname", "-a"})
+ session.WaitWithDefaultTimeout()
+ exitCode := session.ExitCode()
+ // CI could either support requested platform or not, if it supports then output should contain `aarch64`
+ // if not run should fail with a very specific error i.e `Exec format error` anything other than this should
+ // be marked as failure of test.
+ if exitCode == 0 {
+ Expect(session.OutputToString()).To(ContainSubstring("aarch64"))
+ } else {
+ Expect(session.ErrorToString()).To(ContainSubstring("Exec format error"))
+ }
+ })
+
It("podman run a container based on a complex local image name", func() {
imageName := strings.TrimPrefix(nginx, "quay.io/")
session := podmanTest.Podman([]string{"run", imageName, "ls"})
@@ -1084,7 +1106,7 @@ USER mail`, BB)
Expect(session).Should(Exit(0))
ctrID := session.OutputToString()
- // check that the read only option works
+ // check that the read-only option works
session = podmanTest.Podman([]string{"run", "--volumes-from", ctrID + ":ro", ALPINE, "touch", mountpoint + "abc.txt"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(1))
@@ -1108,13 +1130,13 @@ USER mail`, BB)
Expect(session).Should(Exit(125))
Expect(session.ErrorToString()).To(ContainSubstring("cannot set :z more than once in mount options"))
- // create new read only volume
+ // create new read-only volume
session = podmanTest.Podman([]string{"create", "--volume", vol + ":" + mountpoint + ":ro", ALPINE, "cat", mountpoint + filename})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
ctrID = session.OutputToString()
- // check if the original volume was mounted as read only that --volumes-from also mount it as read only
+ // check if the original volume was mounted as read-only that --volumes-from also mount it as read-only
session = podmanTest.Podman([]string{"run", "--volumes-from", ctrID, ALPINE, "touch", mountpoint + "abc.txt"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(1))