summaryrefslogtreecommitdiff
path: root/test/system/140-diff.bats
diff options
context:
space:
mode:
Diffstat (limited to 'test/system/140-diff.bats')
-rw-r--r--test/system/140-diff.bats13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/system/140-diff.bats b/test/system/140-diff.bats
index 9f4a2c0de..01ec5430e 100644
--- a/test/system/140-diff.bats
+++ b/test/system/140-diff.bats
@@ -6,9 +6,16 @@
load helpers
@test "podman diff" {
+ n=$(random_string 10) # container name
rand_file=$(random_string 10)
- run_podman run $IMAGE sh -c "touch /$rand_file;rm /etc/services"
- run_podman diff --format json -l
+ run_podman run --name $n $IMAGE sh -c "touch /$rand_file;rm /etc/services"
+
+ # If running local, test `-l` (latest) option. This can't work with remote.
+ if ! is_remote; then
+ n=-l
+ fi
+
+ run_podman diff --format json $n
# Expected results for each type of diff
declare -A expect=(
@@ -22,7 +29,7 @@ load helpers
is "$result" "${expect[$field]}" "$field"
done
- run_podman rm -l
+ run_podman rm $n
}
# vim: filetype=sh