summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/config.go20
-rw-r--r--test/e2e/create_test.go56
-rw-r--r--test/e2e/exec_test.go1
-rw-r--r--test/e2e/pull_test.go137
-rw-r--r--test/e2e/push_test.go17
-rw-r--r--test/e2e/run_selinux_test.go12
6 files changed, 219 insertions, 24 deletions
diff --git a/test/e2e/config.go b/test/e2e/config.go
index 5e0000e09..aeb7affee 100644
--- a/test/e2e/config.go
+++ b/test/e2e/config.go
@@ -1,11 +1,17 @@
package integration
var (
- redis = "docker.io/library/redis:alpine"
- fedoraMinimal = "registry.fedoraproject.org/fedora-minimal:latest"
- ALPINE = "docker.io/library/alpine:latest"
- infra = "k8s.gcr.io/pause:3.1"
- BB = "docker.io/library/busybox:latest"
- healthcheck = "docker.io/libpod/alpine_healthcheck:latest"
- ImageCacheDir = "/tmp/podman/imagecachedir"
+ redis = "docker.io/library/redis:alpine"
+ fedoraMinimal = "registry.fedoraproject.org/fedora-minimal:latest"
+ ALPINE = "docker.io/library/alpine:latest"
+ ALPINELISTTAG = "docker.io/library/alpine:3.10.2"
+ ALPINELISTDIGEST = "docker.io/library/alpine@sha256:72c42ed48c3a2db31b7dafe17d275b634664a708d901ec9fd57b1529280f01fb"
+ ALPINEAMD64DIGEST = "docker.io/library/alpine@sha256:acd3ca9941a85e8ed16515bfc5328e4e2f8c128caa72959a58a127b7801ee01f"
+ ALPINEAMD64ID = "961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4"
+ ALPINEARM64DIGEST = "docker.io/library/alpine@sha256:db7f3dcef3d586f7dd123f107c93d7911515a5991c4b9e51fa2a43e46335a43e"
+ ALPINEARM64ID = "915beeae46751fc564998c79e73a1026542e945ca4f73dc841d09ccc6c2c0672"
+ infra = "k8s.gcr.io/pause:3.1"
+ BB = "docker.io/library/busybox:latest"
+ healthcheck = "docker.io/libpod/alpine_healthcheck:latest"
+ ImageCacheDir = "/tmp/podman/imagecachedir"
)
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go
index 65b747880..f5dca321c 100644
--- a/test/e2e/create_test.go
+++ b/test/e2e/create_test.go
@@ -239,6 +239,62 @@ var _ = Describe("Podman create", func() {
session = podmanTest.PodmanNoCache([]string{"create", "--pull", "always", "--name=foo", "nginx"})
session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
+ It("podman create using image list by tag", func() {
+ session := podmanTest.PodmanNoCache([]string{"create", "--pull=always", "--override-arch=arm64", "--name=foo", ALPINELISTTAG})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.Image}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64ID))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.ImageName}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTTAG))
+ })
+
+ It("podman create using image list by digest", func() {
+ session := podmanTest.PodmanNoCache([]string{"create", "--pull=always", "--override-arch=arm64", "--name=foo", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.Image}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64ID))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.ImageName}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ })
+
+ It("podman create using image list instance by digest", func() {
+ session := podmanTest.PodmanNoCache([]string{"create", "--pull=always", "--override-arch=arm64", "--name=foo", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.Image}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64ID))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.ImageName}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ })
+
+ It("podman create using cross-arch image list instance by digest", func() {
+ session := podmanTest.PodmanNoCache([]string{"create", "--pull=always", "--override-arch=ppc64le", "--name=foo", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.Image}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64ID))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.ImageName}}", "foo"})
+ session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
})
})
diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go
index 1c4a9adb9..ed4eb3335 100644
--- a/test/e2e/exec_test.go
+++ b/test/e2e/exec_test.go
@@ -243,4 +243,5 @@ var _ = Describe("Podman exec", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
})
+
})
diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go
index 537084220..5152409af 100644
--- a/test/e2e/pull_test.go
+++ b/test/e2e/pull_test.go
@@ -93,6 +93,143 @@ var _ = Describe("Podman pull", func() {
Expect(session.ExitCode()).To(Equal(0))
})
+ It("podman pull by digest (image list)", func() {
+ session := podmanTest.PodmanNoCache([]string{"pull", "--override-arch=arm64", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ // inspect using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(HavePrefix("[]"))
+ // inspect using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // inspect using the digest of the arch-specific image's manifest
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(HavePrefix("[]"))
+ // inspect using the digest of the arch-specific image's manifest
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // inspect using the image ID
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINEARM64ID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(HavePrefix("[]"))
+ // inspect using the image ID
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINEARM64ID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // remove using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"rmi", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
+ It("podman pull by instance digest (image list)", func() {
+ session := podmanTest.PodmanNoCache([]string{"pull", "--override-arch=arm64", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ // inspect using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+ // inspect using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+ // inspect using the digest of the arch-specific image's manifest
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(HavePrefix("[]"))
+ // inspect using the digest of the arch-specific image's manifest
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(Not(ContainSubstring(ALPINELISTDIGEST)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // inspect using the image ID
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINEARM64ID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(HavePrefix("[]"))
+ // inspect using the image ID
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINEARM64ID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(Not(ContainSubstring(ALPINELISTDIGEST)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // remove using the digest of the instance
+ session = podmanTest.PodmanNoCache([]string{"rmi", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
+ It("podman pull by tag (image list)", func() {
+ session := podmanTest.PodmanNoCache([]string{"pull", "--override-arch=arm64", ALPINELISTTAG})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ // inspect using the tag we used for pulling
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINELISTTAG})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTTAG))
+ // inspect using the tag we used for pulling
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINELISTTAG})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // inspect using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTTAG))
+ // inspect using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // inspect using the digest of the arch-specific image's manifest
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTTAG))
+ // inspect using the digest of the arch-specific image's manifest
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // inspect using the image ID
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINEARM64ID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTTAG))
+ // inspect using the image ID
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINEARM64ID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // remove using the tag
+ session = podmanTest.PodmanNoCache([]string{"rmi", ALPINELISTTAG})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
It("podman pull bogus image", func() {
session := podmanTest.PodmanNoCache([]string{"pull", "umohnani/get-started"})
session.WaitWithDefaultTimeout()
diff --git a/test/e2e/push_test.go b/test/e2e/push_test.go
index 50f0ca6d9..0747257be 100644
--- a/test/e2e/push_test.go
+++ b/test/e2e/push_test.go
@@ -203,23 +203,6 @@ var _ = Describe("Podman push", func() {
Expect(session.ExitCode()).To(Equal(0))
})
- It("podman push to local ostree", func() {
- if !IsCommandAvailable("ostree") {
- Skip("ostree is not installed")
- }
-
- ostreePath := filepath.Join(podmanTest.TempDir, "ostree/repo")
- os.MkdirAll(ostreePath, os.ModePerm)
-
- setup := SystemExec("ostree", []string{strings.Join([]string{"--repo=", ostreePath}, ""), "init"})
- Expect(setup.ExitCode()).To(Equal(0))
-
- session := podmanTest.PodmanNoCache([]string{"push", ALPINE, strings.Join([]string{"ostree:alp@", ostreePath}, "")})
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
-
- })
-
It("podman push to docker-archive no reference", func() {
tarfn := filepath.Join(podmanTest.TempDir, "alp.tar")
session := podmanTest.PodmanNoCache([]string{"push", ALPINE,
diff --git a/test/e2e/run_selinux_test.go b/test/e2e/run_selinux_test.go
index 0c78ab15b..ebc36b7f1 100644
--- a/test/e2e/run_selinux_test.go
+++ b/test/e2e/run_selinux_test.go
@@ -165,4 +165,16 @@ var _ = Describe("Podman run", func() {
Expect(session.ExitCode()).To(Equal(126))
})
+ It("podman exec selinux check", func() {
+ setup := podmanTest.RunTopContainer("test1")
+ setup.WaitWithDefaultTimeout()
+ Expect(setup.ExitCode()).To(Equal(0))
+
+ session := podmanTest.Podman([]string{"exec", "test1", "cat", "/proc/self/attr/current"})
+ session.WaitWithDefaultTimeout()
+ session1 := podmanTest.Podman([]string{"exec", "test1", "cat", "/proc/self/attr/current"})
+ session1.WaitWithDefaultTimeout()
+ Expect(session.OutputToString()).To(Equal(session1.OutputToString()))
+ })
+
})