summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/checkpoint_test.go2
-rw-r--r--test/e2e/cp_test.go2
-rw-r--r--test/e2e/create_test.go1
-rw-r--r--test/e2e/diff_test.go6
-rw-r--r--test/e2e/exists_test.go1
-rw-r--r--test/e2e/generate_kube_test.go2
-rw-r--r--test/e2e/healthcheck_run_test.go2
-rw-r--r--test/e2e/inspect_test.go64
-rw-r--r--test/e2e/libpod_suite_remote_test.go6
-rw-r--r--test/e2e/pod_create_test.go1
-rw-r--r--test/e2e/pod_rm_test.go1
-rw-r--r--test/e2e/pod_stats_test.go17
-rw-r--r--test/e2e/pod_stop_test.go2
-rw-r--r--test/e2e/ps_test.go2
-rw-r--r--test/e2e/pull_test.go1
-rw-r--r--test/e2e/rm_test.go3
-rw-r--r--test/e2e/run_networking_test.go26
-rw-r--r--test/e2e/stop_test.go2
-rw-r--r--test/e2e/systemd_test.go8
-rw-r--r--test/e2e/volume_rm_test.go1
20 files changed, 112 insertions, 38 deletions
diff --git a/test/e2e/checkpoint_test.go b/test/e2e/checkpoint_test.go
index e6a3d2f7a..663205209 100644
--- a/test/e2e/checkpoint_test.go
+++ b/test/e2e/checkpoint_test.go
@@ -232,6 +232,8 @@ var _ = Describe("Podman checkpoint", func() {
})
It("podman checkpoint container with established tcp connections", func() {
+ // Broken on Ubuntu.
+ SkipIfNotFedora()
localRunString := getRunString([]string{redis})
session := podmanTest.Podman(localRunString)
session.WaitWithDefaultTimeout()
diff --git a/test/e2e/cp_test.go b/test/e2e/cp_test.go
index f95f8646c..6ae54ba34 100644
--- a/test/e2e/cp_test.go
+++ b/test/e2e/cp_test.go
@@ -141,6 +141,8 @@ var _ = Describe("Podman cp", func() {
})
It("podman cp stdin/stdout", func() {
+ SkipIfRemote()
+ Skip("Looks like SkipIfRemote() is not working")
session := podmanTest.Podman([]string{"create", ALPINE, "ls", "foo"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go
index 0a6373bfa..f40472a7c 100644
--- a/test/e2e/create_test.go
+++ b/test/e2e/create_test.go
@@ -301,7 +301,6 @@ var _ = Describe("Podman create", func() {
})
It("podman create --authfile with nonexist authfile", func() {
- SkipIfRemote()
session := podmanTest.PodmanNoCache([]string{"create", "--authfile", "/tmp/nonexist", "--name=foo", ALPINE})
session.WaitWithDefaultTimeout()
Expect(session).To(Not(Equal(0)))
diff --git a/test/e2e/diff_test.go b/test/e2e/diff_test.go
index d273f9463..fbbe49eac 100644
--- a/test/e2e/diff_test.go
+++ b/test/e2e/diff_test.go
@@ -61,7 +61,6 @@ var _ = Describe("Podman diff", func() {
})
It("podman diff container and committed image", func() {
- SkipIfRemote()
session := podmanTest.Podman([]string{"run", "--name=diff-test", ALPINE, "touch", "/tmp/diff-test"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -82,11 +81,10 @@ var _ = Describe("Podman diff", func() {
})
It("podman diff latest container", func() {
- SkipIfRemote()
- session := podmanTest.Podman([]string{"run", "--name=diff-test", ALPINE, "touch", "/tmp/diff-test"})
+ session := podmanTest.Podman([]string{"run", "--name", "diff-test", ALPINE, "touch", "/tmp/diff-test"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- session = podmanTest.Podman([]string{"diff", "-l"})
+ session = podmanTest.Podman([]string{"diff", "diff-test"})
session.WaitWithDefaultTimeout()
containerDiff := session.OutputToStringArray()
sort.Strings(containerDiff)
diff --git a/test/e2e/exists_test.go b/test/e2e/exists_test.go
index e26fad51d..8f3b371d8 100644
--- a/test/e2e/exists_test.go
+++ b/test/e2e/exists_test.go
@@ -112,7 +112,6 @@ var _ = Describe("Podman image|container exists", func() {
})
It("podman pod does not exist in local storage", func() {
// The exit code for non-existing pod is incorrect (125 vs 1)
- SkipIfRemote()
session := podmanTest.Podman([]string{"pod", "exists", "foobar"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(1))
diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go
index 395cc1ea4..7872a9fbf 100644
--- a/test/e2e/generate_kube_test.go
+++ b/test/e2e/generate_kube_test.go
@@ -254,6 +254,8 @@ var _ = Describe("Podman generate kube", func() {
})
It("podman generate with user and reimport kube on pod", func() {
+ // This test fails on ubuntu due to https://github.com/seccomp/containers-golang/pull/27
+ SkipIfNotFedora()
podName := "toppod"
_, rc, _ := podmanTest.CreatePod(podName)
Expect(rc).To(Equal(0))
diff --git a/test/e2e/healthcheck_run_test.go b/test/e2e/healthcheck_run_test.go
index 8e63d9f4c..d8e3f045f 100644
--- a/test/e2e/healthcheck_run_test.go
+++ b/test/e2e/healthcheck_run_test.go
@@ -42,7 +42,6 @@ var _ = Describe("Podman healthcheck run", func() {
})
It("podman disable healthcheck with --no-healthcheck on valid container", func() {
- SkipIfRemote()
session := podmanTest.Podman([]string{"run", "-dt", "--no-healthcheck", "--name", "hc", healthcheck})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -52,7 +51,6 @@ var _ = Describe("Podman healthcheck run", func() {
})
It("podman disable healthcheck with --health-cmd=none on valid container", func() {
- SkipIfRemote()
session := podmanTest.Podman([]string{"run", "-dt", "--health-cmd", "none", "--name", "hc", healthcheck})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go
index 77cfe4fd3..62f69f1c1 100644
--- a/test/e2e/inspect_test.go
+++ b/test/e2e/inspect_test.go
@@ -132,28 +132,27 @@ var _ = Describe("Podman inspect", func() {
})
It("podman inspect with mount filters", func() {
- SkipIfRemote()
- ctrSession := podmanTest.Podman([]string{"create", "-v", "/tmp:/test1", ALPINE, "top"})
+ ctrSession := podmanTest.Podman([]string{"create", "--name", "test", "-v", "/tmp:/test1", ALPINE, "top"})
ctrSession.WaitWithDefaultTimeout()
Expect(ctrSession.ExitCode()).To(Equal(0))
- inspectSource := podmanTest.Podman([]string{"inspect", "-l", "--format", "{{(index .Mounts 0).Source}}"})
+ inspectSource := podmanTest.Podman([]string{"inspect", "test", "--format", "{{(index .Mounts 0).Source}}"})
inspectSource.WaitWithDefaultTimeout()
Expect(inspectSource.ExitCode()).To(Equal(0))
Expect(inspectSource.OutputToString()).To(Equal("/tmp"))
- inspectSrc := podmanTest.Podman([]string{"inspect", "-l", "--format", "{{(index .Mounts 0).Src}}"})
+ inspectSrc := podmanTest.Podman([]string{"inspect", "test", "--format", "{{(index .Mounts 0).Src}}"})
inspectSrc.WaitWithDefaultTimeout()
Expect(inspectSrc.ExitCode()).To(Equal(0))
Expect(inspectSrc.OutputToString()).To(Equal("/tmp"))
- inspectDestination := podmanTest.Podman([]string{"inspect", "-l", "--format", "{{(index .Mounts 0).Destination}}"})
+ inspectDestination := podmanTest.Podman([]string{"inspect", "test", "--format", "{{(index .Mounts 0).Destination}}"})
inspectDestination.WaitWithDefaultTimeout()
Expect(inspectDestination.ExitCode()).To(Equal(0))
Expect(inspectDestination.OutputToString()).To(Equal("/test1"))
- inspectDst := podmanTest.Podman([]string{"inspect", "-l", "--format", "{{(index .Mounts 0).Dst}}"})
+ inspectDst := podmanTest.Podman([]string{"inspect", "test", "--format", "{{(index .Mounts 0).Dst}}"})
inspectDst.WaitWithDefaultTimeout()
Expect(inspectDst.ExitCode()).To(Equal(0))
Expect(inspectDst.OutputToString()).To(Equal("/test1"))
@@ -171,4 +170,57 @@ var _ = Describe("Podman inspect", func() {
Expect(imageData[0].HealthCheck.Interval).To(BeNumerically("==", 60000000000))
Expect(imageData[0].HealthCheck.Test).To(Equal([]string{"CMD-SHELL", "curl -f http://localhost/ || exit 1"}))
})
+
+ It("podman inspect --latest with no container fails", func() {
+ SkipIfRemote()
+
+ session := podmanTest.Podman([]string{"inspect", "--latest"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+ })
+
+ It("podman [image,container] inspect on image", func() {
+ baseInspect := podmanTest.Podman([]string{"inspect", ALPINE})
+ baseInspect.WaitWithDefaultTimeout()
+ Expect(baseInspect.ExitCode()).To(Equal(0))
+ baseJSON := baseInspect.InspectImageJSON()
+ Expect(len(baseJSON)).To(Equal(1))
+
+ ctrInspect := podmanTest.Podman([]string{"container", "inspect", ALPINE})
+ ctrInspect.WaitWithDefaultTimeout()
+ Expect(ctrInspect.ExitCode()).To(Not(Equal(0)))
+
+ imageInspect := podmanTest.Podman([]string{"image", "inspect", ALPINE})
+ imageInspect.WaitWithDefaultTimeout()
+ Expect(imageInspect.ExitCode()).To(Equal(0))
+ imageJSON := imageInspect.InspectImageJSON()
+ Expect(len(imageJSON)).To(Equal(1))
+
+ Expect(baseJSON[0].ID).To(Equal(imageJSON[0].ID))
+ })
+
+ It("podman [image, container] inspect on container", func() {
+ ctrName := "testCtr"
+ create := podmanTest.Podman([]string{"create", "--name", ctrName, ALPINE, "sh"})
+ create.WaitWithDefaultTimeout()
+ Expect(create.ExitCode()).To(Equal(0))
+
+ baseInspect := podmanTest.Podman([]string{"inspect", ctrName})
+ baseInspect.WaitWithDefaultTimeout()
+ Expect(baseInspect.ExitCode()).To(Equal(0))
+ baseJSON := baseInspect.InspectContainerToJSON()
+ Expect(len(baseJSON)).To(Equal(1))
+
+ ctrInspect := podmanTest.Podman([]string{"container", "inspect", ctrName})
+ ctrInspect.WaitWithDefaultTimeout()
+ Expect(ctrInspect.ExitCode()).To(Equal(0))
+ ctrJSON := ctrInspect.InspectContainerToJSON()
+ Expect(len(ctrJSON)).To(Equal(1))
+
+ imageInspect := podmanTest.Podman([]string{"image", "inspect", ctrName})
+ imageInspect.WaitWithDefaultTimeout()
+ Expect(imageInspect.ExitCode()).To(Not(Equal(0)))
+
+ Expect(baseJSON[0].ID).To(Equal(ctrJSON[0].ID))
+ })
})
diff --git a/test/e2e/libpod_suite_remote_test.go b/test/e2e/libpod_suite_remote_test.go
index dde853413..b94b6e267 100644
--- a/test/e2e/libpod_suite_remote_test.go
+++ b/test/e2e/libpod_suite_remote_test.go
@@ -36,7 +36,7 @@ func SkipIfRootlessV2() {
// Podman is the exec call to podman on the filesystem
func (p *PodmanTestIntegration) Podman(args []string) *PodmanSessionIntegration {
- var remoteArgs = []string{"--remote", p.RemoteSocket}
+ var remoteArgs = []string{"--remote", "--url", p.RemoteSocket}
remoteArgs = append(remoteArgs, args...)
podmanSession := p.PodmanBase(remoteArgs, false, false)
return &PodmanSessionIntegration{podmanSession}
@@ -44,7 +44,7 @@ func (p *PodmanTestIntegration) Podman(args []string) *PodmanSessionIntegration
// PodmanExtraFiles is the exec call to podman on the filesystem and passes down extra files
func (p *PodmanTestIntegration) PodmanExtraFiles(args []string, extraFiles []*os.File) *PodmanSessionIntegration {
- var remoteArgs = []string{"--remote", p.RemoteSocket}
+ var remoteArgs = []string{"--remote", "--url", p.RemoteSocket}
remoteArgs = append(remoteArgs, args...)
podmanSession := p.PodmanAsUserBase(remoteArgs, 0, 0, "", nil, false, false, extraFiles)
return &PodmanSessionIntegration{podmanSession}
@@ -52,7 +52,7 @@ func (p *PodmanTestIntegration) PodmanExtraFiles(args []string, extraFiles []*os
// PodmanNoCache calls podman with out adding the imagecache
func (p *PodmanTestIntegration) PodmanNoCache(args []string) *PodmanSessionIntegration {
- var remoteArgs = []string{"--remote", p.RemoteSocket}
+ var remoteArgs = []string{"--remote", "--url", p.RemoteSocket}
remoteArgs = append(remoteArgs, args...)
podmanSession := p.PodmanBase(remoteArgs, false, true)
return &PodmanSessionIntegration{podmanSession}
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index e56db54a2..a7d5783cb 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -238,7 +238,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with IP address", func() {
- SkipIfRemote()
SkipIfRootless()
name := "test"
ip := GetRandomIPAddress()
diff --git a/test/e2e/pod_rm_test.go b/test/e2e/pod_rm_test.go
index e10b3c98f..4060e1268 100644
--- a/test/e2e/pod_rm_test.go
+++ b/test/e2e/pod_rm_test.go
@@ -213,7 +213,6 @@ var _ = Describe("Podman pod rm", func() {
})
It("podman rm --ignore bogus pod and a running pod", func() {
- SkipIfRemote()
_, ec, podid1 := podmanTest.CreatePod("")
Expect(ec).To(Equal(0))
diff --git a/test/e2e/pod_stats_test.go b/test/e2e/pod_stats_test.go
index 9bba59073..778b44d1e 100644
--- a/test/e2e/pod_stats_test.go
+++ b/test/e2e/pod_stats_test.go
@@ -178,4 +178,21 @@ var _ = Describe("Podman pod stats", func() {
Expect(stats).To(ExitWithError())
})
+ It("podman stats on net=host post", func() {
+ // --net=host not supported for rootless pods at present
+ SkipIfRootless()
+ podName := "testPod"
+ podCreate := podmanTest.Podman([]string{"pod", "create", "--net=host", "--name", podName})
+ podCreate.WaitWithDefaultTimeout()
+ Expect(podCreate.ExitCode()).To(Equal(0))
+
+ ctrRun := podmanTest.Podman([]string{"run", "-d", "--pod", podName, ALPINE, "top"})
+ ctrRun.WaitWithDefaultTimeout()
+ Expect(ctrRun.ExitCode()).To(Equal(0))
+
+ stats := podmanTest.Podman([]string{"pod", "stats", "--format", "json", "--no-stream", podName})
+ stats.WaitWithDefaultTimeout()
+ Expect(stats.ExitCode()).To(Equal(0))
+ Expect(stats.IsJSONOutputValid()).To(BeTrue())
+ })
})
diff --git a/test/e2e/pod_stop_test.go b/test/e2e/pod_stop_test.go
index 298f3da2f..0a46b07c9 100644
--- a/test/e2e/pod_stop_test.go
+++ b/test/e2e/pod_stop_test.go
@@ -39,7 +39,6 @@ var _ = Describe("Podman pod stop", func() {
})
It("podman pod stop --ignore bogus pod", func() {
- SkipIfRemote()
session := podmanTest.Podman([]string{"pod", "stop", "--ignore", "123"})
session.WaitWithDefaultTimeout()
@@ -60,7 +59,6 @@ var _ = Describe("Podman pod stop", func() {
})
It("podman stop --ignore bogus pod and a running pod", func() {
- SkipIfRemote()
_, ec, podid1 := podmanTest.CreatePod("")
Expect(ec).To(Equal(0))
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go
index 12ce4661f..0dc8e01af 100644
--- a/test/e2e/ps_test.go
+++ b/test/e2e/ps_test.go
@@ -362,8 +362,6 @@ var _ = Describe("Podman ps", func() {
})
It("podman --pod with a non-empty pod name", func() {
- SkipIfRemote()
-
podName := "testPodName"
_, ec, podid := podmanTest.CreatePod(podName)
Expect(ec).To(Equal(0))
diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go
index 96340ef30..ac882927f 100644
--- a/test/e2e/pull_test.go
+++ b/test/e2e/pull_test.go
@@ -351,7 +351,6 @@ var _ = Describe("Podman pull", func() {
})
It("podman pull from docker with nonexist --authfile", func() {
- SkipIfRemote()
session := podmanTest.PodmanNoCache([]string{"pull", "--authfile", "/tmp/nonexist", ALPINE})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Not(Equal(0)))
diff --git a/test/e2e/rm_test.go b/test/e2e/rm_test.go
index 87e3de922..d0dbd527a 100644
--- a/test/e2e/rm_test.go
+++ b/test/e2e/rm_test.go
@@ -141,7 +141,6 @@ var _ = Describe("Podman rm", func() {
})
It("podman rm --cidfile", func() {
- SkipIfRemote()
tmpDir, err := ioutil.TempDir("", "")
Expect(err).To(BeNil())
@@ -164,7 +163,6 @@ var _ = Describe("Podman rm", func() {
})
It("podman rm multiple --cidfile", func() {
- SkipIfRemote()
tmpDir, err := ioutil.TempDir("", "")
Expect(err).To(BeNil())
@@ -235,7 +233,6 @@ var _ = Describe("Podman rm", func() {
})
It("podman rm --ignore bogus container and a running container", func() {
- SkipIfRemote()
session := podmanTest.RunTopContainer("test1")
session.WaitWithDefaultTimeout()
diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go
index 9db2f5d49..4fad85f00 100644
--- a/test/e2e/run_networking_test.go
+++ b/test/e2e/run_networking_test.go
@@ -129,6 +129,32 @@ var _ = Describe("Podman run networking", func() {
Expect(inspectOut[0].NetworkSettings.Ports[0].HostIP).To(Equal("127.0.0.1"))
})
+ It("podman run -p [::1]:8080:80/udp", func() {
+ name := "testctr"
+ session := podmanTest.Podman([]string{"create", "-t", "-p", "[::1]:8080:80/udp", "--name", name, ALPINE, "/bin/sh"})
+ session.WaitWithDefaultTimeout()
+ inspectOut := podmanTest.InspectContainer(name)
+ Expect(len(inspectOut)).To(Equal(1))
+ Expect(len(inspectOut[0].NetworkSettings.Ports)).To(Equal(1))
+ Expect(inspectOut[0].NetworkSettings.Ports[0].HostPort).To(Equal(int32(8080)))
+ Expect(inspectOut[0].NetworkSettings.Ports[0].ContainerPort).To(Equal(int32(80)))
+ Expect(inspectOut[0].NetworkSettings.Ports[0].Protocol).To(Equal("udp"))
+ Expect(inspectOut[0].NetworkSettings.Ports[0].HostIP).To(Equal("::1"))
+ })
+
+ It("podman run -p [::1]:8080:80/tcp", func() {
+ name := "testctr"
+ session := podmanTest.Podman([]string{"create", "-t", "-p", "[::1]:8080:80/tcp", "--name", name, ALPINE, "/bin/sh"})
+ session.WaitWithDefaultTimeout()
+ inspectOut := podmanTest.InspectContainer(name)
+ Expect(len(inspectOut)).To(Equal(1))
+ Expect(len(inspectOut[0].NetworkSettings.Ports)).To(Equal(1))
+ Expect(inspectOut[0].NetworkSettings.Ports[0].HostPort).To(Equal(int32(8080)))
+ Expect(inspectOut[0].NetworkSettings.Ports[0].ContainerPort).To(Equal(int32(80)))
+ Expect(inspectOut[0].NetworkSettings.Ports[0].Protocol).To(Equal("tcp"))
+ Expect(inspectOut[0].NetworkSettings.Ports[0].HostIP).To(Equal("::1"))
+ })
+
It("podman run --expose 80 -P", func() {
name := "testctr"
session := podmanTest.Podman([]string{"create", "-t", "--expose", "80", "-P", "--name", name, ALPINE, "/bin/sh"})
diff --git a/test/e2e/stop_test.go b/test/e2e/stop_test.go
index cd78a54e1..4ed0b6293 100644
--- a/test/e2e/stop_test.go
+++ b/test/e2e/stop_test.go
@@ -233,7 +233,6 @@ var _ = Describe("Podman stop", func() {
})
It("podman stop --cidfile", func() {
- SkipIfRemote()
tmpDir, err := ioutil.TempDir("", "")
Expect(err).To(BeNil())
@@ -258,7 +257,6 @@ var _ = Describe("Podman stop", func() {
})
It("podman stop multiple --cidfile", func() {
- SkipIfRemote()
tmpDir, err := ioutil.TempDir("", "")
Expect(err).To(BeNil())
diff --git a/test/e2e/systemd_test.go b/test/e2e/systemd_test.go
index 1275670eb..a35e5113a 100644
--- a/test/e2e/systemd_test.go
+++ b/test/e2e/systemd_test.go
@@ -8,7 +8,6 @@ import (
"strings"
"time"
- "github.com/containers/libpod/pkg/cgroups"
. "github.com/containers/libpod/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
@@ -82,13 +81,6 @@ WantedBy=multi-user.target
})
It("podman run container with systemd PID1", func() {
- cgroupsv2, err := cgroups.IsCgroup2UnifiedMode()
- Expect(err).To(BeNil())
- if cgroupsv2 {
- // TODO: Find a way to enable this for v2
- Skip("systemd test does not work in cgroups V2 mode yet")
- }
-
systemdImage := "fedora"
pull := podmanTest.Podman([]string{"pull", systemdImage})
pull.WaitWithDefaultTimeout()
diff --git a/test/e2e/volume_rm_test.go b/test/e2e/volume_rm_test.go
index 6f2020828..742d4e0dc 100644
--- a/test/e2e/volume_rm_test.go
+++ b/test/e2e/volume_rm_test.go
@@ -48,7 +48,6 @@ var _ = Describe("Podman volume rm", func() {
})
It("podman volume rm with --force flag", func() {
- SkipIfRemote()
session := podmanTest.Podman([]string{"create", "-v", "myvol:/myvol", ALPINE, "ls"})
cid := session.OutputToString()
session.WaitWithDefaultTimeout()