summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-07-31 09:05:48 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-01 13:01:44 +0000
commita8ae7eae9c9e545b685abfd1e42a2a63cb547a80 (patch)
treed7d8077f1c38bfee990cb3ca061c53ff408023dd /test/e2e
parent1a439f9fcbbc6a2b509c1ca7e23207a07a652399 (diff)
downloadpodman-a8ae7eae9c9e545b685abfd1e42a2a63cb547a80.tar.gz
podman-a8ae7eae9c9e545b685abfd1e42a2a63cb547a80.tar.bz2
podman-a8ae7eae9c9e545b685abfd1e42a2a63cb547a80.zip
Integration Test Improvements #3
Third round of speed improvements to the integration tests. Signed-off-by: baude <bbaude@redhat.com> Closes: #1193 Approved by: rhatdan
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/commit_test.go3
-rw-r--r--test/e2e/libpod_suite_test.go4
-rw-r--r--test/e2e/load_test.go9
-rw-r--r--test/e2e/push_test.go9
-rw-r--r--test/e2e/refresh_test.go2
-rw-r--r--test/e2e/rmi_test.go4
-rw-r--r--test/e2e/run_cleanup_test.go5
-rw-r--r--test/e2e/run_test.go11
-rw-r--r--test/e2e/search_test.go28
9 files changed, 41 insertions, 34 deletions
diff --git a/test/e2e/commit_test.go b/test/e2e/commit_test.go
index 8620d48ef..c0e050da4 100644
--- a/test/e2e/commit_test.go
+++ b/test/e2e/commit_test.go
@@ -78,8 +78,7 @@ var _ = Describe("Podman commit", func() {
})
It("podman commit container with change flag", func() {
- podmanTest.RestoreArtifact(fedoraMinimal)
- test := podmanTest.Podman([]string{"run", "--name", "test1", "-d", fedoraMinimal, "ls"})
+ test := podmanTest.Podman([]string{"run", "--name", "test1", "-d", ALPINE, "ls"})
test.WaitWithDefaultTimeout()
Expect(test.ExitCode()).To(Equal(0))
Expect(podmanTest.NumberOfContainers()).To(Equal(1))
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go
index 2be41ae26..ab09d5004 100644
--- a/test/e2e/libpod_suite_test.go
+++ b/test/e2e/libpod_suite_test.go
@@ -29,13 +29,15 @@ var (
INTEGRATION_ROOT string
STORAGE_OPTIONS = "--storage-driver vfs"
ARTIFACT_DIR = "/tmp/.artifacts"
- CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, nginx}
+ CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, nginx, redis, registry}
RESTORE_IMAGES = []string{ALPINE, BB}
ALPINE = "docker.io/library/alpine:latest"
BB = "docker.io/library/busybox:latest"
BB_GLIBC = "docker.io/library/busybox:glibc"
fedoraMinimal = "registry.fedoraproject.org/fedora-minimal:latest"
nginx = "quay.io/baude/alpine_nginx:latest"
+ redis = "docker.io/library/redis:alpine"
+ registry = "docker.io/library/registry:2"
defaultWaitTimeout = 90
)
diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go
index a4910df0c..d2ea8c6c7 100644
--- a/test/e2e/load_test.go
+++ b/test/e2e/load_test.go
@@ -193,9 +193,8 @@ var _ = Describe("Podman load", func() {
It("podman load localhost repo from dir", func() {
outfile := filepath.Join(podmanTest.TempDir, "load")
- podmanTest.RestoreArtifact(fedoraMinimal)
- setup := podmanTest.Podman([]string{"tag", "fedora-minimal", "hello:world"})
+ setup := podmanTest.Podman([]string{"tag", BB, "hello:world"})
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
@@ -218,16 +217,16 @@ var _ = Describe("Podman load", func() {
})
It("podman load xz compressed image", func() {
- outfile := filepath.Join(podmanTest.TempDir, "alpine.tar")
+ outfile := filepath.Join(podmanTest.TempDir, "bb.tar")
- save := podmanTest.Podman([]string{"save", "-o", outfile, ALPINE})
+ save := podmanTest.Podman([]string{"save", "-o", outfile, BB})
save.WaitWithDefaultTimeout()
Expect(save.ExitCode()).To(Equal(0))
session := podmanTest.SystemExec("xz", []string{outfile})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- rmi := podmanTest.Podman([]string{"rmi", ALPINE})
+ rmi := podmanTest.Podman([]string{"rmi", BB})
rmi.WaitWithDefaultTimeout()
Expect(rmi.ExitCode()).To(Equal(0))
diff --git a/test/e2e/push_test.go b/test/e2e/push_test.go
index ed07933f7..3ee150551 100644
--- a/test/e2e/push_test.go
+++ b/test/e2e/push_test.go
@@ -58,7 +58,8 @@ var _ = Describe("Podman push", func() {
})
It("podman push to local registry", func() {
- session := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", "docker.io/library/registry:2", "/entrypoint.sh", "/etc/docker/registry/config.yml"})
+ podmanTest.RestoreArtifact(registry)
+ session := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -91,8 +92,8 @@ var _ = Describe("Podman push", func() {
defer podmanTest.SystemExec("setenforce", []string{"1"})
}
}
-
- session := podmanTest.Podman([]string{"run", "--entrypoint", "htpasswd", "registry:2", "-Bbn", "podmantest", "test"})
+ podmanTest.RestoreArtifact(registry)
+ session := podmanTest.Podman([]string{"run", "--entrypoint", "htpasswd", registry, "-Bbn", "podmantest", "test"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -108,7 +109,7 @@ var _ = Describe("Podman push", func() {
strings.Join([]string{authPath, "/auth"}, ":"), "-e", "REGISTRY_AUTH=htpasswd", "-e",
"REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm", "-e", "REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd",
"-v", strings.Join([]string{certPath, "/certs"}, ":"), "-e", "REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt",
- "-e", "REGISTRY_HTTP_TLS_KEY=/certs/domain.key", "registry:2"})
+ "-e", "REGISTRY_HTTP_TLS_KEY=/certs/domain.key", registry})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
diff --git a/test/e2e/refresh_test.go b/test/e2e/refresh_test.go
index 76601354f..c4a65aa47 100644
--- a/test/e2e/refresh_test.go
+++ b/test/e2e/refresh_test.go
@@ -53,7 +53,7 @@ var _ = Describe("Podman refresh", func() {
})
Specify("Refresh with running container restarts container", func() {
- createSession := podmanTest.Podman([]string{"run", "-d", ALPINE, "sleep", "120"})
+ createSession := podmanTest.Podman([]string{"run", "-dt", ALPINE, "top"})
createSession.WaitWithDefaultTimeout()
Expect(createSession.ExitCode()).To(Equal(0))
Expect(podmanTest.NumberOfContainers()).To(Equal(1))
diff --git a/test/e2e/rmi_test.go b/test/e2e/rmi_test.go
index 4e38f04f8..054b83431 100644
--- a/test/e2e/rmi_test.go
+++ b/test/e2e/rmi_test.go
@@ -150,7 +150,7 @@ var _ = Describe("Podman rmi", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- session = podmanTest.Podman([]string{"run", "--name", "c_test1", ALPINE, "true"})
+ session = podmanTest.Podman([]string{"create", "--name", "c_test1", ALPINE, "true"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -158,7 +158,7 @@ var _ = Describe("Podman rmi", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- session = podmanTest.Podman([]string{"run", "--name", "c_test2", "test1", "true"})
+ session = podmanTest.Podman([]string{"create", "--name", "c_test2", "test1", "true"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
diff --git a/test/e2e/run_cleanup_test.go b/test/e2e/run_cleanup_test.go
index 68e0d2208..02c70734a 100644
--- a/test/e2e/run_cleanup_test.go
+++ b/test/e2e/run_cleanup_test.go
@@ -35,13 +35,10 @@ var _ = Describe("Podman run exit", func() {
mount := podmanTest.SystemExec("mount", nil)
mount.WaitWithDefaultTimeout()
out1 := mount.OutputToString()
- result := podmanTest.Podman([]string{"run", "-d", ALPINE, "echo", "hello"})
+ result := podmanTest.Podman([]string{"create", "-dt", ALPINE, "echo", "hello"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
- result = podmanTest.SystemExec("sleep", []string{"5"})
- result.WaitWithDefaultTimeout()
-
mount = podmanTest.SystemExec("mount", nil)
mount.WaitWithDefaultTimeout()
out2 := mount.OutputToString()
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 4c328662b..1c86d48bc 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -490,11 +490,12 @@ var _ = Describe("Podman run", func() {
})
It("podman run with built-in volume image", func() {
- session := podmanTest.Podman([]string{"run", "--rm", "docker.io/library/redis:alpine", "ls"})
+ podmanTest.RestoreArtifact(redis)
+ session := podmanTest.Podman([]string{"run", "--rm", redis, "ls"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- session = podmanTest.Podman([]string{"rmi", "docker.io/library/redis:alpine"})
+ session = podmanTest.Podman([]string{"rmi", redis})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -524,7 +525,8 @@ USER mail`
err = ioutil.WriteFile(volFile, []byte(data), 0755)
Expect(err).To(BeNil())
- session := podmanTest.Podman([]string{"create", "--volume", vol + ":/myvol", "docker.io/library/redis:alpine", "sh"})
+ podmanTest.RestoreArtifact(redis)
+ session := podmanTest.Podman([]string{"create", "--volume", vol + ":/myvol", redis, "sh"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
ctrID := session.OutputToString()
@@ -539,7 +541,8 @@ USER mail`
})
It("podman run --volumes-from flag with built-in volumes", func() {
- session := podmanTest.Podman([]string{"create", "docker.io/library/redis:alpine", "sh"})
+ podmanTest.RestoreArtifact(redis)
+ session := podmanTest.Podman([]string{"create", redis, "sh"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
ctrID := session.OutputToString()
diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go
index dec84b19a..bdbd5e770 100644
--- a/test/e2e/search_test.go
+++ b/test/e2e/search_test.go
@@ -123,7 +123,8 @@ var _ = Describe("Podman search", func() {
})
It("podman search attempts HTTP if tls-verify flag is set false", func() {
- fakereg := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", "docker.io/library/registry:2", "/entrypoint.sh", "/etc/docker/registry/config.yml"})
+ podmanTest.RestoreArtifact(registry)
+ fakereg := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
fakereg.WaitWithDefaultTimeout()
Expect(fakereg.ExitCode()).To(Equal(0))
@@ -142,7 +143,8 @@ var _ = Describe("Podman search", func() {
})
It("podman search in local registry", func() {
- registry := podmanTest.Podman([]string{"run", "-d", "--name", "registry3", "-p", "5000:5000", "docker.io/library/registry:2", "/entrypoint.sh", "/etc/docker/registry/config.yml"})
+ podmanTest.RestoreArtifact(registry)
+ registry := podmanTest.Podman([]string{"run", "-d", "--name", "registry3", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
registry.WaitWithDefaultTimeout()
Expect(registry.ExitCode()).To(Equal(0))
@@ -161,7 +163,8 @@ var _ = Describe("Podman search", func() {
})
It("podman search attempts HTTP if registry is in registries.insecure and force secure is false", func() {
- registry := podmanTest.Podman([]string{"run", "-d", "--name", "registry4", "-p", "5000:5000", "docker.io/library/registry:2", "/entrypoint.sh", "/etc/docker/registry/config.yml"})
+ podmanTest.RestoreArtifact(registry)
+ registry := podmanTest.Podman([]string{"run", "-d", "--name", "registry4", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
registry.WaitWithDefaultTimeout()
Expect(registry.ExitCode()).To(Equal(0))
@@ -192,7 +195,8 @@ var _ = Describe("Podman search", func() {
})
It("podman search doesn't attempt HTTP if force secure is true", func() {
- registry := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry5", "registry:2"})
+ podmanTest.RestoreArtifact(registry)
+ registry := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry5", registry})
registry.WaitWithDefaultTimeout()
Expect(registry.ExitCode()).To(Equal(0))
@@ -222,7 +226,8 @@ var _ = Describe("Podman search", func() {
})
It("podman search doesn't attempt HTTP if registry is not listed as insecure", func() {
- registry := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry6", "registry:2"})
+ podmanTest.RestoreArtifact(registry)
+ registry := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry6", registry})
registry.WaitWithDefaultTimeout()
Expect(registry.ExitCode()).To(Equal(0))
@@ -252,17 +257,18 @@ var _ = Describe("Podman search", func() {
})
It("podman search doesn't attempt HTTP if one registry is not listed as insecure", func() {
- registry := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry7", "registry:2"})
- registry.WaitWithDefaultTimeout()
- Expect(registry.ExitCode()).To(Equal(0))
+ podmanTest.RestoreArtifact(registry)
+ registryLocal := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry7", registry})
+ registryLocal.WaitWithDefaultTimeout()
+ Expect(registryLocal.ExitCode()).To(Equal(0))
if !WaitContainerReady(&podmanTest, "registry7", "listening on", 20, 1) {
Skip("Can not start docker registry.")
}
- registry = podmanTest.Podman([]string{"run", "-d", "-p", "6000:5000", "--name", "registry8", "registry:2"})
- registry.WaitWithDefaultTimeout()
- Expect(registry.ExitCode()).To(Equal(0))
+ registryLocal = podmanTest.Podman([]string{"run", "-d", "-p", "6000:5000", "--name", "registry8", registry})
+ registryLocal.WaitWithDefaultTimeout()
+ Expect(registryLocal.ExitCode()).To(Equal(0))
if !WaitContainerReady(&podmanTest, "registry8", "listening on", 20, 1) {
Skip("Can not start docker registry.")