diff options
author | baude <bbaude@redhat.com> | 2018-07-31 09:05:48 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-01 13:01:44 +0000 |
commit | a8ae7eae9c9e545b685abfd1e42a2a63cb547a80 (patch) | |
tree | d7d8077f1c38bfee990cb3ca061c53ff408023dd /test/e2e/search_test.go | |
parent | 1a439f9fcbbc6a2b509c1ca7e23207a07a652399 (diff) | |
download | podman-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/search_test.go')
-rw-r--r-- | test/e2e/search_test.go | 28 |
1 files changed, 17 insertions, 11 deletions
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.") |