summaryrefslogtreecommitdiff
path: root/test/system/200-pod-top.bats
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2019-03-07 15:15:50 -0700
committerEd Santiago <santiago@redhat.com>2019-03-18 15:21:52 -0600
commit58d2e589fb4dbcc23cfc5ddd3f886a32a0ab759e (patch)
tree647f839b8dda979e8526f6aa335d4bc2c52ff468 /test/system/200-pod-top.bats
parent07e10d9dd6c0c0828637f770234266daa182fc95 (diff)
downloadpodman-58d2e589fb4dbcc23cfc5ddd3f886a32a0ab759e.tar.gz
podman-58d2e589fb4dbcc23cfc5ddd3f886a32a0ab759e.tar.bz2
podman-58d2e589fb4dbcc23cfc5ddd3f886a32a0ab759e.zip
BATS: new tests, and improvements to existing ones
New: - podman exec - podman load (requires #2674) - CLI parsing (regression test for #2574) Improved: - help: test "podman NoSuchCommand", and subcommands - help: test "podman cmd" without required args - pod: start with --infra=false; this allows running rootless - log: also run 'logs' after container is run - log: test -f with two containers Also, use helpful descriptions for skip_if_rootless Tested on f29, root and rootless. As soon as podman-remote supports rm, I'll start testing that too. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/200-pod-top.bats')
-rw-r--r--test/system/200-pod-top.bats14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/system/200-pod-top.bats b/test/system/200-pod-top.bats
index 81c4be3ff..0200df00d 100644
--- a/test/system/200-pod-top.bats
+++ b/test/system/200-pod-top.bats
@@ -3,9 +3,10 @@
load helpers
@test "podman pod top - containers in different PID namespaces" {
- skip_if_rootless
-
- run_podman pod create
+ # With infra=false, we don't get a /pause container (we also
+ # don't pull k8s.gcr.io/pause )
+ no_infra='--infra=false'
+ run_podman pod create $no_infra
podid="$output"
# Start two containers...
@@ -23,11 +24,14 @@ load helpers
run_podman pod top $podid
is "$output" ".*root.*top -d 2.*root.*top -d 2" "two 'top' containers"
- # There should be a /pause container
+ # By default (podman pod create w/ default --infra) there should be
+ # a /pause container.
# FIXME: sometimes there is, sometimes there isn't. If anyone ever
# actually figures this out, please either reenable this line or
# remove it entirely.
- #is "$output" ".*0 \+1 \+0 \+[0-9. ?s]\+/pause" "there is a /pause container"
+ if [ -z "$no_infra" ]; then
+ is "$output" ".*0 \+1 \+0 \+[0-9. ?s]\+/pause" "there is a /pause container"
+ fi
# Clean up
run_podman pod rm -f $podid