summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/20-containers.at52
-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/healthcheck_run_test.go2
-rw-r--r--test/e2e/inspect_test.go11
-rw-r--r--test/e2e/pod_create_test.go1
-rw-r--r--test/e2e/ps_test.go2
-rw-r--r--test/e2e/pull_test.go1
-rw-r--r--test/e2e/volume_rm_test.go1
10 files changed, 59 insertions, 19 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index 7fb39b221..8b535928a 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -30,4 +30,56 @@ cid=$(jq -r '.[0].Id' <<<"$output")
t DELETE libpod/containers/$cid 204
+CNAME=myfoo
+podman run --name $CNAME $IMAGE -td top
+t GET libpod/containers/json?all=true 200 \
+ .[0].Id~[0-9a-f]\\{12\\}
+cid=$(jq -r '.[0].Id' <<<"$output")
+
+# No such container
+t POST "libpod/commit?container=nonesuch" '' 404
+
+# Comment can only be used with docker format, not OCI
+cparam="repo=newrepo&comment=foo&author=bob"
+t POST "libpod/commit?container=$CNAME&$cparam" '' 500
+
+# Commit a new image from the container
+t POST "libpod/commit?container=$CNAME" '' 200 \
+ .Id~[0-9a-f]\\{12\\}
+iid=$(jq -r '.Id' <<<"$output")
+t GET libpod/images/$iid/json 200 \
+ .RepoTags[0]=null \
+ .Author="" \
+ .Comment=""
+
+# Commit a new image w/o tag
+cparam="repo=newrepo&comment=foo&author=bob&format=docker"
+t POST "libpod/commit?container=$CNAME&$cparam" '' 200
+t GET libpod/images/newrepo:latest/json 200 \
+ .RepoTags[0]=localhost/newrepo:latest \
+ .Author=bob \
+ .Comment=foo
+
+# Commit a new image w/ specified tag and author
+cparam="repo=newrepo&tag=v1&author=alice"
+t POST "libpod/commit?container=$cid&$cparam&pause=false" '' 200
+t GET libpod/images/newrepo:v1/json 200 \
+ .RepoTags[0]=localhost/newrepo:v1 \
+ .Author=alice
+
+# Commit a new image w/ full parameters
+cparam="repo=newrepo&tag=v2&comment=bar&author=eric"
+cparam="$cparam&format=docker&changes=CMD=/bin/foo"
+t POST "libpod/commit?container=${cid:0:12}&$cparam&pause=true" '' 200
+t GET libpod/images/newrepo:v2/json 200 \
+ .RepoTags[0]=localhost/newrepo:v2 \
+ .Author=eric \
+ .Comment=bar \
+ .Config.Cmd[-1]="/bin/foo"
+
+t DELETE images/localhost/newrepo:latest?force=true 200
+t DELETE images/localhost/newrepo:v1?force=true 200
+t DELETE images/localhost/newrepo:v2?force=true 200
+t DELETE libpod/containers/$cid 204
+
# vim: filetype=sh
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/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 a36534a39..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"))
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/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/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()