diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-03-07 15:23:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-07 15:23:54 -0800 |
commit | 1b2f8679b864b882fdccaad6fdd6a5c86c83291b (patch) | |
tree | e131eaf7fbecf6c36ca6f21468cef6bd8ebac4cd /test/system/200-pod-top.bats | |
parent | e0f224816d41ccf353bccd9ef6933a201cdc7d64 (diff) | |
parent | 589248d2f359dea73fc763ac587e2927f005b300 (diff) | |
download | podman-1b2f8679b864b882fdccaad6fdd6a5c86c83291b.tar.gz podman-1b2f8679b864b882fdccaad6fdd6a5c86c83291b.tar.bz2 podman-1b2f8679b864b882fdccaad6fdd6a5c86c83291b.zip |
Merge pull request #2533 from edsantiago/bats
New system tests under BATS
Diffstat (limited to 'test/system/200-pod-top.bats')
-rw-r--r-- | test/system/200-pod-top.bats | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/system/200-pod-top.bats b/test/system/200-pod-top.bats new file mode 100644 index 000000000..81c4be3ff --- /dev/null +++ b/test/system/200-pod-top.bats @@ -0,0 +1,37 @@ +#!/usr/bin/env bats + +load helpers + +@test "podman pod top - containers in different PID namespaces" { + skip_if_rootless + + run_podman pod create + podid="$output" + + # Start two containers... + run_podman run -d --pod $podid $IMAGE top -d 2 + cid1="$output" + run_podman run -d --pod $podid $IMAGE top -d 2 + cid2="$output" + + # ...and wait for them to actually start. + wait_for_output "PID \+PPID \+USER " $cid1 + wait_for_output "PID \+PPID \+USER " $cid2 + + # Both containers have emitted at least one top-like line. + # Now run 'pod top', and expect two 'top -d 2' processes running. + run_podman pod top $podid + is "$output" ".*root.*top -d 2.*root.*top -d 2" "two 'top' containers" + + # 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" + + # Clean up + run_podman pod rm -f $podid +} + + +# vim: filetype=sh |