-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19586 from rhatdan/ps
Fix output of podman --remote top
- Loading branch information
Showing
6 changed files
with
57 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bats | ||
|
||
load helpers | ||
|
||
@test "podman top - basic tests" { | ||
run_podman run -d $IMAGE top | ||
cid=$output | ||
is "$cid" "[0-9a-f]\{64\}$" | ||
|
||
run_podman top $cid | ||
is "${lines[0]}" "USER[ \t]*PID[ \t]*PPID[ \t]*%CPU[ \t]*ELAPSED[ \t]*TTY[ \t]*TIME[ \t]*COMMAND" "podman top" | ||
is "${lines[1]}" "root[ \t]*1[ \t]*0[ \t]*0.000[ \t]*" "podman top" | ||
|
||
run_podman top $cid -eo pid,comm | ||
is "${lines[0]}" "[ \t]*PID[ \t]*COMMAND" "podman top -eo pid,comm Heading" | ||
is "${lines[1]}" "[ \t]*1[ \t]*top" "podman top -eo pid,comm processes" | ||
|
||
run_podman top $cid -eo "pid comm" | ||
is "${lines[0]}" "[ \t]*PID[ \t]*COMMAND" "podman top -eo "pid comm" Heading" | ||
is "${lines[1]}" "[ \t]*1[ \t]*top" "podman top -eo "pid comm" processes" | ||
|
||
run_podman rm -f $cid | ||
} | ||
|
||
# vim: filetype=sh |