diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-11-01 06:19:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-01 06:19:51 -0700 |
commit | 20a3a53c2faea408af47023ea60c76b5b5ecea3c (patch) | |
tree | fd0ac4794b476315375af880d15051c6c977331a /test | |
parent | e75469ab99c48e9fbe2b36ade229d384bdea9144 (diff) | |
parent | 0360ec725acf7a179b03f4d7a3a5fe1cc2e383c8 (diff) | |
download | podman-20a3a53c2faea408af47023ea60c76b5b5ecea3c.tar.gz podman-20a3a53c2faea408af47023ea60c76b5b5ecea3c.tar.bz2 podman-20a3a53c2faea408af47023ea60c76b5b5ecea3c.zip |
Merge pull request #1740 from baude/ppc64le
allow ppc64le to pass libpod integration tests
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/config.go | 9 | ||||
-rw-r--r-- | test/e2e/config_amd64.go | 11 | ||||
-rw-r--r-- | test/e2e/config_ppc64le.go | 11 | ||||
-rw-r--r-- | test/e2e/libpod_suite_test.go | 15 | ||||
-rw-r--r-- | test/e2e/load_test.go | 3 | ||||
-rw-r--r-- | test/e2e/logs_test.go | 6 | ||||
-rw-r--r-- | test/e2e/push_test.go | 6 | ||||
-rw-r--r-- | test/e2e/rmi_test.go | 11 | ||||
-rw-r--r-- | test/e2e/rootless_test.go | 2 | ||||
-rw-r--r-- | test/e2e/run_signal_test.go | 3 | ||||
-rw-r--r-- | test/e2e/run_test.go | 6 | ||||
-rw-r--r-- | test/e2e/search_test.go | 18 |
12 files changed, 77 insertions, 24 deletions
diff --git a/test/e2e/config.go b/test/e2e/config.go new file mode 100644 index 000000000..8116d993b --- /dev/null +++ b/test/e2e/config.go @@ -0,0 +1,9 @@ +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" +) diff --git a/test/e2e/config_amd64.go b/test/e2e/config_amd64.go new file mode 100644 index 000000000..268f88f26 --- /dev/null +++ b/test/e2e/config_amd64.go @@ -0,0 +1,11 @@ +package integration + +var ( + STORAGE_OPTIONS = "--storage-driver vfs" + ROOTLESS_STORAGE_OPTIONS = "--storage-driver vfs" + CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, nginx, redis, registry, infra, labels} + nginx = "quay.io/baude/alpine_nginx:latest" + BB_GLIBC = "docker.io/library/busybox:glibc" + registry = "docker.io/library/registry:2" + labels = "quay.io/baude/alpine_labels:latest" +) diff --git a/test/e2e/config_ppc64le.go b/test/e2e/config_ppc64le.go new file mode 100644 index 000000000..8c821fc7f --- /dev/null +++ b/test/e2e/config_ppc64le.go @@ -0,0 +1,11 @@ +package integration + +var ( + STORAGE_OPTIONS = "--storage-driver overlay" + ROOTLESS_STORAGE_OPTIONS = "--storage-driver vfs" + CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, nginx, redis, infra, labels} + nginx = "quay.io/baude/alpine_nginx-ppc64le:latest" + BB_GLIBC = "docker.io/ppc64le/busybox:glibc" + labels = "quay.io/baude/alpine_labels-ppc64le:latest" + registry string +) diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go index 56a603f3e..ec274cc34 100644 --- a/test/e2e/libpod_suite_test.go +++ b/test/e2e/libpod_suite_test.go @@ -9,6 +9,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "strings" "testing" "time" @@ -29,19 +30,8 @@ var ( RUNC_BINARY string INTEGRATION_ROOT string CGROUP_MANAGER = "systemd" - STORAGE_OPTIONS = "--storage-driver vfs" ARTIFACT_DIR = "/tmp/.artifacts" - CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, nginx, redis, registry, infra, labels} 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" - infra = "k8s.gcr.io/pause:3.1" - labels = "quay.io/baude/alpine_labels:latest" defaultWaitTimeout = 90 ) @@ -70,6 +60,7 @@ type PodmanTest struct { type HostOS struct { Distribution string Version string + Arch string } // TestLibpod ginkgo master function @@ -245,7 +236,6 @@ func (p *PodmanTest) Cleanup() { // Remove all containers stopall := p.Podman([]string{"stop", "-a", "--timeout", "0"}) stopall.WaitWithDefaultTimeout() - session := p.Podman([]string{"rm", "-fa"}) session.Wait(90) // Nuke tempdir @@ -662,6 +652,7 @@ func GetHostDistributionInfo() HostOS { l := bufio.NewScanner(f) host := HostOS{} + host.Arch = runtime.GOARCH for l.Scan() { if strings.HasPrefix(l.Text(), "ID=") { host.Distribution = strings.Replace(strings.TrimSpace(strings.Join(strings.Split(l.Text(), "=")[1:], "")), "\"", "", -1) diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go index 4f288c216..21e8a4859 100644 --- a/test/e2e/load_test.go +++ b/test/e2e/load_test.go @@ -139,6 +139,9 @@ var _ = Describe("Podman load", func() { }) It("podman load multiple tags", func() { + if podmanTest.Host.Arch == "ppc64le" { + Skip("skip on ppc64le") + } outfile := filepath.Join(podmanTest.TempDir, "alpine.tar") alpVersion := "docker.io/library/alpine:3.2" diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go index 871987db0..6888863ca 100644 --- a/test/e2e/logs_test.go +++ b/test/e2e/logs_test.go @@ -33,7 +33,6 @@ var _ = Describe("Podman logs", func() { //sudo bin/podman run -it --rm fedora-minimal bash -c 'for a in `seq 5`; do echo hello; done' It("podman logs for container", func() { - podmanTest.RestoreArtifact(fedoraMinimal) logc := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"}) logc.WaitWithDefaultTimeout() Expect(logc.ExitCode()).To(Equal(0)) @@ -46,7 +45,6 @@ var _ = Describe("Podman logs", func() { }) It("podman logs tail two lines", func() { - podmanTest.RestoreArtifact(fedoraMinimal) logc := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"}) logc.WaitWithDefaultTimeout() Expect(logc.ExitCode()).To(Equal(0)) @@ -59,7 +57,6 @@ var _ = Describe("Podman logs", func() { }) It("podman logs tail 99 lines", func() { - podmanTest.RestoreArtifact(fedoraMinimal) logc := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"}) logc.WaitWithDefaultTimeout() Expect(logc.ExitCode()).To(Equal(0)) @@ -72,7 +69,6 @@ var _ = Describe("Podman logs", func() { }) It("podman logs tail 2 lines with timestamps", func() { - podmanTest.RestoreArtifact(fedoraMinimal) logc := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"}) logc.WaitWithDefaultTimeout() Expect(logc.ExitCode()).To(Equal(0)) @@ -85,7 +81,6 @@ var _ = Describe("Podman logs", func() { }) It("podman logs latest with since time", func() { - podmanTest.RestoreArtifact(fedoraMinimal) logc := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"}) logc.WaitWithDefaultTimeout() Expect(logc.ExitCode()).To(Equal(0)) @@ -98,7 +93,6 @@ var _ = Describe("Podman logs", func() { }) It("podman logs latest with since duration", func() { - podmanTest.RestoreArtifact(fedoraMinimal) logc := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"}) logc.WaitWithDefaultTimeout() Expect(logc.ExitCode()).To(Equal(0)) diff --git a/test/e2e/push_test.go b/test/e2e/push_test.go index 3ee150551..5e3d3745a 100644 --- a/test/e2e/push_test.go +++ b/test/e2e/push_test.go @@ -58,6 +58,9 @@ var _ = Describe("Podman push", func() { }) It("podman push to local registry", func() { + if podmanTest.Host.Arch == "ppc64le" { + Skip("No registry image for ppc64le") + } podmanTest.RestoreArtifact(registry) session := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"}) session.WaitWithDefaultTimeout() @@ -73,6 +76,9 @@ var _ = Describe("Podman push", func() { }) It("podman push to local registry with authorization", func() { + if podmanTest.Host.Arch == "ppc64le" { + Skip("No registry image for ppc64le") + } authPath := filepath.Join(podmanTest.TempDir, "auth") os.Mkdir(authPath, os.ModePerm) os.MkdirAll("/etc/containers/certs.d/localhost:5000", os.ModePerm) diff --git a/test/e2e/rmi_test.go b/test/e2e/rmi_test.go index 8224cd345..2a1a0da77 100644 --- a/test/e2e/rmi_test.go +++ b/test/e2e/rmi_test.go @@ -13,8 +13,6 @@ var _ = Describe("Podman rmi", func() { tempdir string err error podmanTest PodmanTest - image1 = "docker.io/library/alpine:latest" - image3 = "docker.io/library/busybox:glibc" ) BeforeEach(func() { @@ -42,7 +40,7 @@ var _ = Describe("Podman rmi", func() { }) It("podman rmi with fq name", func() { - session := podmanTest.Podman([]string{"rmi", image1}) + session := podmanTest.Podman([]string{"rmi", ALPINE}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) @@ -56,15 +54,18 @@ var _ = Describe("Podman rmi", func() { }) It("podman rmi all images", func() { - podmanTest.PullImages([]string{image3}) + podmanTest.PullImages([]string{nginx}) session := podmanTest.Podman([]string{"rmi", "-a"}) session.WaitWithDefaultTimeout() + images := podmanTest.Podman([]string{"images"}) + images.WaitWithDefaultTimeout() + fmt.Println(images.OutputToStringArray()) Expect(session.ExitCode()).To(Equal(0)) }) It("podman rmi all images forcibly with short options", func() { - podmanTest.PullImages([]string{image3}) + podmanTest.PullImages([]string{nginx}) session := podmanTest.Podman([]string{"rmi", "-fa"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) diff --git a/test/e2e/rootless_test.go b/test/e2e/rootless_test.go index bd782a5fc..876e10969 100644 --- a/test/e2e/rootless_test.go +++ b/test/e2e/rootless_test.go @@ -40,6 +40,7 @@ var _ = Describe("Podman rootless", func() { } podmanTest = PodmanCreate(tempdir) podmanTest.CgroupManager = "cgroupfs" + podmanTest.StorageOptions = ROOTLESS_STORAGE_OPTIONS podmanTest.RestoreAllArtifacts() }) @@ -92,6 +93,7 @@ var _ = Describe("Podman rootless", func() { Expect(err).To(BeNil()) rootlessTest := PodmanCreate(tempdir) rootlessTest.CgroupManager = "cgroupfs" + rootlessTest.StorageOptions = ROOTLESS_STORAGE_OPTIONS err = filepath.Walk(tempdir, chownFunc) Expect(err).To(BeNil()) diff --git a/test/e2e/run_signal_test.go b/test/e2e/run_signal_test.go index 02b6f4941..5de17108c 100644 --- a/test/e2e/run_signal_test.go +++ b/test/e2e/run_signal_test.go @@ -56,6 +56,9 @@ var _ = Describe("Podman run with --sig-proxy", func() { }) Specify("signals are forwarded to container using sig-proxy", func() { + if podmanTest.Host.Arch == "ppc64le" { + Skip("Doesnt work on ppc64le") + } signal := syscall.SIGFPE // Set up a socket for communication udsDir := filepath.Join(tmpdir, "socket") diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index cb436ccca..d362c1646 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -42,8 +42,9 @@ var _ = Describe("Podman run", func() { }) It("podman run a container based on a complex local image name", func() { + imageName := strings.TrimPrefix(nginx, "quay.io/") podmanTest.RestoreArtifact(nginx) - session := podmanTest.Podman([]string{"run", "baude/alpine_nginx:latest", "ls"}) + session := podmanTest.Podman([]string{"run", imageName, "ls"}) session.WaitWithDefaultTimeout() Expect(session.ErrorToString()).ToNot(ContainSubstring("Trying to pull")) Expect(session.ExitCode()).To(Equal(0)) @@ -203,6 +204,9 @@ var _ = Describe("Podman run", func() { }) It("podman run with mount flag", func() { + if podmanTest.Host.Arch == "ppc64le" { + Skip("skip failing test on ppc64le") + } mountPath := filepath.Join(podmanTest.TempDir, "secrets") os.Mkdir(mountPath, 0755) session := podmanTest.Podman([]string{"run", "--rm", "--mount", fmt.Sprintf("type=bind,src=%s,target=/run/test", mountPath), ALPINE, "grep", "/run/test", "/proc/self/mountinfo"}) diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go index 2848da259..84f1efbca 100644 --- a/test/e2e/search_test.go +++ b/test/e2e/search_test.go @@ -128,6 +128,9 @@ var _ = Describe("Podman search", func() { }) It("podman search attempts HTTP if tls-verify flag is set false", func() { + if podmanTest.Host.Arch == "ppc64le" { + Skip("No registry image for ppc64le") + } podmanTest.RestoreArtifact(registry) fakereg := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"}) fakereg.WaitWithDefaultTimeout() @@ -148,6 +151,9 @@ var _ = Describe("Podman search", func() { }) It("podman search in local registry", func() { + if podmanTest.Host.Arch == "ppc64le" { + Skip("No registry image for ppc64le") + } podmanTest.RestoreArtifact(registry) registry := podmanTest.Podman([]string{"run", "-d", "--name", "registry3", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"}) registry.WaitWithDefaultTimeout() @@ -168,6 +174,9 @@ var _ = Describe("Podman search", func() { }) It("podman search attempts HTTP if registry is in registries.insecure and force secure is false", func() { + if podmanTest.Host.Arch == "ppc64le" { + Skip("No registry image for ppc64le") + } podmanTest.RestoreArtifact(registry) registry := podmanTest.Podman([]string{"run", "-d", "--name", "registry4", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"}) registry.WaitWithDefaultTimeout() @@ -197,6 +206,9 @@ var _ = Describe("Podman search", func() { }) It("podman search doesn't attempt HTTP if force secure is true", func() { + if podmanTest.Host.Arch == "ppc64le" { + Skip("No registry image for ppc64le") + } podmanTest.RestoreArtifact(registry) registry := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry5", registry}) registry.WaitWithDefaultTimeout() @@ -225,6 +237,9 @@ var _ = Describe("Podman search", func() { }) It("podman search doesn't attempt HTTP if registry is not listed as insecure", func() { + if podmanTest.Host.Arch == "ppc64le" { + Skip("No registry image for ppc64le") + } podmanTest.RestoreArtifact(registry) registry := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry6", registry}) registry.WaitWithDefaultTimeout() @@ -253,6 +268,9 @@ var _ = Describe("Podman search", func() { }) It("podman search doesn't attempt HTTP if one registry is not listed as insecure", func() { + if podmanTest.Host.Arch == "ppc64le" { + Skip("No registry image for ppc64le") + } podmanTest.RestoreArtifact(registry) registryLocal := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry7", registry}) registryLocal.WaitWithDefaultTimeout() |