aboutsummaryrefslogtreecommitdiff
path: root/test/system/helpers.bash
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-10 11:52:44 +0200
committerGitHub <noreply@github.com>2019-08-10 11:52:44 +0200
commitd65cb664379117de527aeb253f1d4230998d2939 (patch)
tree8f066968a431a093547a3439d171d73bcae91b70 /test/system/helpers.bash
parentb6e2bc3cc99c5819891efe1c77d03686b8707269 (diff)
parent5c108cdab4888c53fbe7d4cb546544cc5a4929aa (diff)
downloadpodman-d65cb664379117de527aeb253f1d4230998d2939.tar.gz
podman-d65cb664379117de527aeb253f1d4230998d2939.tar.bz2
podman-d65cb664379117de527aeb253f1d4230998d2939.zip
Merge pull request #3758 from edsantiago/bats
implement 'make remotesystem'
Diffstat (limited to 'test/system/helpers.bash')
-rw-r--r--test/system/helpers.bash21
1 files changed, 13 insertions, 8 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash
index fe0a25b37..3d607f4bd 100644
--- a/test/system/helpers.bash
+++ b/test/system/helpers.bash
@@ -216,26 +216,31 @@ function wait_for_ready {
###############################################################################
# BEGIN miscellaneous tools
+# Shortcuts for common needs:
+function is_rootless() {
+ [ "$(id -u)" -ne 0 ]
+}
+
+function is_remote() {
+ [[ "$PODMAN" =~ -remote ]]
+}
+
######################
# skip_if_rootless # ...with an optional message
######################
function skip_if_rootless() {
- if [ "$(id -u)" -eq 0 ]; then
- return
+ if is_rootless; then
+ skip "${1:-not applicable under rootless podman}"
fi
-
- skip "${1:-not applicable under rootless podman}"
}
####################
# skip_if_remote # ...with an optional message
####################
function skip_if_remote() {
- if [[ ! "$PODMAN" =~ -remote ]]; then
- return
+ if is_remote; then
+ skip "${1:-test does not work with podman-remote}"
fi
-
- skip "${1:-test does not work with podman-remote}"
}
#########################