summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/commit_test.go2
-rw-r--r--test/e2e/generate_kube_test.go4
-rw-r--r--test/e2e/healthcheck_run_test.go3
-rw-r--r--test/e2e/pod_rm_test.go32
-rw-r--r--test/e2e/run_test.go1
-rw-r--r--test/e2e/volume_rm_test.go4
6 files changed, 26 insertions, 20 deletions
diff --git a/test/e2e/commit_test.go b/test/e2e/commit_test.go
index bf9c88de5..fe4ae64cf 100644
--- a/test/e2e/commit_test.go
+++ b/test/e2e/commit_test.go
@@ -144,7 +144,7 @@ var _ = Describe("Podman commit", func() {
inspect.WaitWithDefaultTimeout()
Expect(inspect.ExitCode()).To(Equal(0))
image := inspect.InspectImageJSON()
- _, ok := image[0].Config.Volumes["/tmp"]
+ _, ok := image[0].Config.Volumes["/foo"]
Expect(ok).To(BeTrue())
r := podmanTest.Podman([]string{"run", "newimage"})
diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go
index 5bcf3b347..2f0af7e5f 100644
--- a/test/e2e/generate_kube_test.go
+++ b/test/e2e/generate_kube_test.go
@@ -48,7 +48,6 @@ var _ = Describe("Podman generate kube", func() {
})
It("podman generate kube on container", func() {
- SkipIfRootless()
session := podmanTest.RunTopContainer("top")
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -62,7 +61,6 @@ var _ = Describe("Podman generate kube", func() {
})
It("podman generate service kube on container", func() {
- SkipIfRootless()
session := podmanTest.RunTopContainer("top")
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -76,7 +74,6 @@ var _ = Describe("Podman generate kube", func() {
})
It("podman generate kube on pod", func() {
- SkipIfRootless()
_, rc, _ := podmanTest.CreatePod("toppod")
Expect(rc).To(Equal(0))
@@ -93,7 +90,6 @@ var _ = Describe("Podman generate kube", func() {
})
It("podman generate service kube on pod", func() {
- SkipIfRootless()
_, rc, _ := podmanTest.CreatePod("toppod")
Expect(rc).To(Equal(0))
diff --git a/test/e2e/healthcheck_run_test.go b/test/e2e/healthcheck_run_test.go
index cd2365ce7..60be86ebc 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 healthcheck on valid container", func() {
- SkipIfRootless()
podmanTest.RestoreArtifact(healthcheck)
session := podmanTest.Podman([]string{"run", "-dt", "--name", "hc", healthcheck})
session.WaitWithDefaultTimeout()
@@ -135,7 +134,6 @@ var _ = Describe("Podman healthcheck run", func() {
})
It("podman healthcheck good check results in healthy even in start-period", func() {
- SkipIfRootless()
session := podmanTest.Podman([]string{"run", "-dt", "--name", "hc", "--healthcheck-start-period", "2m", "--healthcheck-retries", "2", "--healthcheck-command", "\"CMD-SHELL\" \"ls\" \"||\" \"exit\" \"1\"", ALPINE, "top"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -149,7 +147,6 @@ var _ = Describe("Podman healthcheck run", func() {
})
It("podman healthcheck single healthy result changes failed to healthy", func() {
- SkipIfRootless()
session := podmanTest.Podman([]string{"run", "-dt", "--name", "hc", "--healthcheck-retries", "2", "--healthcheck-command", "\"CMD-SHELL\" \"ls\" \"/foo\" \"||\" \"exit\" \"1\"", ALPINE, "top"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
diff --git a/test/e2e/pod_rm_test.go b/test/e2e/pod_rm_test.go
index f9d7abe8f..5da3d563b 100644
--- a/test/e2e/pod_rm_test.go
+++ b/test/e2e/pod_rm_test.go
@@ -3,6 +3,7 @@
package integration
import (
+ "fmt"
"os"
. "github.com/containers/libpod/test/utils"
@@ -95,28 +96,41 @@ var _ = Describe("Podman pod rm", func() {
})
It("podman pod rm -a doesn't remove a running container", func() {
+ fmt.Printf("To start, there are %d pods\n", podmanTest.NumberOfPods())
_, ec, podid1 := podmanTest.CreatePod("")
Expect(ec).To(Equal(0))
_, ec, _ = podmanTest.CreatePod("")
Expect(ec).To(Equal(0))
+ fmt.Printf("Started %d pods\n", podmanTest.NumberOfPods())
session := podmanTest.RunTopContainerInPod("", podid1)
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
+ podmanTest.WaitForContainer()
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))
+ fmt.Printf("Started container running in one pod")
+ num_pods := podmanTest.NumberOfPods()
+ Expect(num_pods).To(Equal(2))
+ ps := podmanTest.Podman([]string{"pod", "ps"})
+ ps.WaitWithDefaultTimeout()
+ fmt.Printf("Current %d pod(s):\n%s\n", num_pods, ps.OutputToString())
+
+ fmt.Printf("Removing all empty pods\n")
result := podmanTest.Podman([]string{"pod", "rm", "-a"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Not(Equal(0)))
-
- result = podmanTest.Podman([]string{"ps", "-q"})
- result.WaitWithDefaultTimeout()
- Expect(len(result.OutputToStringArray())).To(Equal(1))
-
- // one pod should have been deleted
- result = podmanTest.Podman([]string{"pod", "ps", "-q"})
- result.WaitWithDefaultTimeout()
- Expect(len(result.OutputToStringArray())).To(Equal(1))
+ foundExpectedError, _ := result.ErrorGrepString("contains containers and cannot be removed")
+ Expect(foundExpectedError).To(Equal(true))
+
+ num_pods = podmanTest.NumberOfPods()
+ ps = podmanTest.Podman([]string{"pod", "ps"})
+ ps.WaitWithDefaultTimeout()
+ fmt.Printf("Final %d pod(s):\n%s\n", num_pods, ps.OutputToString())
+ Expect(num_pods).To(Equal(1))
+ // Confirm top container still running inside remaining pod
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))
})
It("podman pod rm -fa removes everything", func() {
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 2daf2fe5b..a89ee491b 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -611,7 +611,6 @@ USER mail`
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).To(ContainSubstring("data"))
-
})
It("podman run --volumes flag with multiple volumes", func() {
diff --git a/test/e2e/volume_rm_test.go b/test/e2e/volume_rm_test.go
index 888474670..39628d56f 100644
--- a/test/e2e/volume_rm_test.go
+++ b/test/e2e/volume_rm_test.go
@@ -32,7 +32,7 @@ var _ = Describe("Podman volume rm", func() {
})
- It("podman rm volume", func() {
+ It("podman volume rm", func() {
session := podmanTest.Podman([]string{"volume", "create", "myvol"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -47,7 +47,7 @@ var _ = Describe("Podman volume rm", func() {
Expect(len(session.OutputToStringArray())).To(Equal(0))
})
- It("podman rm with --force flag", func() {
+ It("podman volume rm with --force flag", func() {
SkipIfRemote()
session := podmanTest.Podman([]string{"create", "-v", "myvol:/myvol", ALPINE, "ls"})
cid := session.OutputToString()