aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-08-04 16:24:34 -0400
committerValentin Rothberg <rothberg@redhat.com>2020-08-11 13:53:23 +0200
commit5b4952395bd7499f45f24a871009c235ba47ca0b (patch)
tree2c29426fda2a499c19e42dcd0011357a2369fe9a /test
parent43527de53e40b737333502f6fbb2e1d73a3f3ec9 (diff)
downloadpodman-5b4952395bd7499f45f24a871009c235ba47ca0b.tar.gz
podman-5b4952395bd7499f45f24a871009c235ba47ca0b.tar.bz2
podman-5b4952395bd7499f45f24a871009c235ba47ca0b.zip
Handle podman-remote run --rm
We need to remove the container after it has exited for podman-remote run --rm commands. If we don't remove this container at this step, we open ourselves up to race conditions. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/030-run.bats2
-rw-r--r--test/system/070-build.bats1
-rw-r--r--test/system/160-volumes.bats4
-rw-r--r--test/system/200-pod.bats3
-rw-r--r--test/system/300-cli-parsing.bats2
-rw-r--r--test/system/400-unprivileged-access.bats2
-rw-r--r--test/system/410-selinux.bats1
7 files changed, 0 insertions, 15 deletions
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index 4f707dda3..12c82bc4c 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -84,8 +84,6 @@ echo $rand | 0 | $rand
# Believe it or not, 'sh -c' resulted in different behavior
run_podman 0 run --rm $IMAGE sh -c /bin/true
run_podman 1 run --rm $IMAGE sh -c /bin/false
-
- if is_remote; then sleep 2;fi # FIXME: pending #7119
}
@test "podman run --name" {
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index 6ec6b09d9..bdc05a172 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -91,7 +91,6 @@ ADD https://github.com/containers/libpod/blob/master/README.md /tmp/
EOF
run_podman build -t add_url $tmpdir
run_podman run --rm add_url stat /tmp/README.md
- if is_remote; then sleep 2;fi # FIXME: pending #7119
run_podman rmi -f add_url
# Now test COPY. That should fail.
diff --git a/test/system/160-volumes.bats b/test/system/160-volumes.bats
index e2aefed43..3f50bd3c4 100644
--- a/test/system/160-volumes.bats
+++ b/test/system/160-volumes.bats
@@ -93,7 +93,6 @@ Labels.l | $mylabel
is "$(<$mountpoint/myfile)" "$rand" "we see content created in container"
# Clean up
- if is_remote; then sleep 2;fi # FIXME: pending #7119
run_podman volume rm $myvolume
}
@@ -135,7 +134,6 @@ EOF
is "$output" "got here -$rand-" "script in volume is runnable with default (exec)"
# Clean up
- if is_remote; then sleep 2;fi # FIXME: pending #7119
run_podman volume rm $myvolume
}
@@ -173,7 +171,6 @@ EOF
run_podman run --rm -v $myvol:/myvol:z $IMAGE \
sh -c "cp /myvol/myfile /myvol/myfile2"
- if is_remote; then sleep 2;fi # FIXME: pending #7119
run_podman volume rm $myvol
# Autocreated volumes should also work with keep-id
@@ -182,7 +179,6 @@ EOF
run_podman run --rm -v $myvol:/myvol:z --userns=keep-id $IMAGE \
touch /myvol/myfile
- if is_remote; then sleep 2;fi # FIXME: pending #7119
run_podman volume rm $myvol
}
diff --git a/test/system/200-pod.bats b/test/system/200-pod.bats
index 6680a896d..93a7d7b5e 100644
--- a/test/system/200-pod.bats
+++ b/test/system/200-pod.bats
@@ -93,7 +93,6 @@ function teardown() {
is "$output" "$message" "message sent from one container to another"
# Clean up. First the nc -l container...
- if is_remote; then sleep 2;fi # FIXME: pending #7119
run_podman rm $cid1
# ...then, from pause container, find the image ID of the pause image...
@@ -104,7 +103,6 @@ function teardown() {
pause_iid="$output"
# ...then rm the pod, then rmi the pause image so we don't leave strays.
- if is_remote; then sleep 2;fi # FIXME: pending #7119
run_podman pod rm $podname
run_podman rmi $pause_iid
@@ -202,7 +200,6 @@ function random_ip() {
is "$output" ".*options $dns_opt" "--dns-opt was added"
# pod inspect
- if is_remote; then sleep 2;fi # FIXME: pending #7119
run_podman pod inspect --format '{{.Name}}: {{.ID}} : {{.NumContainers}} : {{.Labels}}' mypod
is "$output" "mypod: $pod_id : 1 : map\[${labelname}:${labelvalue}]" \
"pod inspect --format ..."
diff --git a/test/system/300-cli-parsing.bats b/test/system/300-cli-parsing.bats
index 2abc01bb7..92c073102 100644
--- a/test/system/300-cli-parsing.bats
+++ b/test/system/300-cli-parsing.bats
@@ -10,8 +10,6 @@ load helpers
# Error: invalid argument "true=\"false\"" for "-l, --label" \
# flag: parse error on line 1, column 5: bare " in non-quoted-field
run_podman run --rm --label 'true="false"' $IMAGE true
-
- if is_remote; then sleep 2;fi # FIXME: pending #7119
}
# vim: filetype=sh
diff --git a/test/system/400-unprivileged-access.bats b/test/system/400-unprivileged-access.bats
index d020bf46a..acf0f0ba2 100644
--- a/test/system/400-unprivileged-access.bats
+++ b/test/system/400-unprivileged-access.bats
@@ -163,8 +163,6 @@ EOF
die "$path: Unknown file type '$type'"
fi
done
-
- if is_remote; then sleep 2;fi # FIXME: pending #7119
}
# vim: filetype=sh
diff --git a/test/system/410-selinux.bats b/test/system/410-selinux.bats
index 1501f8554..3dca59641 100644
--- a/test/system/410-selinux.bats
+++ b/test/system/410-selinux.bats
@@ -16,7 +16,6 @@ function check_label() {
# FIXME: it'd be nice to specify the command to run, e.g. 'ls -dZ /',
# but alpine ls (from busybox) doesn't support -Z
run_podman run --rm $args $IMAGE cat -v /proc/self/attr/current
- if is_remote; then sleep 2;fi # FIXME: pending #7119
# FIXME: on some CI systems, 'run --privileged' emits a spurious
# warning line about dup devices. Ignore it.