summaryrefslogtreecommitdiff
path: root/test/system/helpers.bash
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-04 14:58:35 +0200
committerGitHub <noreply@github.com>2020-08-04 14:58:35 +0200
commit6aed1076a21bc913210efd1f6ad7377dfd85a9f2 (patch)
tree3c5e6fe3267f360704ce5b10237ce884702b16c0 /test/system/helpers.bash
parent7eca5571dc9d39590bc0127f15257921dea30c55 (diff)
parenta4fcf09b7ab5daa30b37705702ba2c2e30e8f9c5 (diff)
downloadpodman-6aed1076a21bc913210efd1f6ad7377dfd85a9f2.tar.gz
podman-6aed1076a21bc913210efd1f6ad7377dfd85a9f2.tar.bz2
podman-6aed1076a21bc913210efd1f6ad7377dfd85a9f2.zip
Merge pull request #7111 from edsantiago/reenable_remote_system_tests
Reenable remote system tests
Diffstat (limited to 'test/system/helpers.bash')
-rw-r--r--test/system/helpers.bash22
1 files changed, 20 insertions, 2 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash
index abca91739..a6414344e 100644
--- a/test/system/helpers.bash
+++ b/test/system/helpers.bash
@@ -240,12 +240,29 @@ function is_remote() {
[[ "$PODMAN" =~ -remote ]]
}
+###########################
+# _add_label_if_missing # make sure skip messages include rootless/remote
+###########################
+function _add_label_if_missing() {
+ local msg="$1"
+ local want="$2"
+
+ if [ -z "$msg" ]; then
+ echo
+ elif expr "$msg" : ".*$want" &>/dev/null; then
+ echo "$msg"
+ else
+ echo "[$want] $msg"
+ fi
+}
+
######################
# skip_if_rootless # ...with an optional message
######################
function skip_if_rootless() {
if is_rootless; then
- skip "${1:-not applicable under rootless podman}"
+ local msg=$(_add_label_if_missing "$1" "rootless")
+ skip "${msg:-not applicable under rootless podman}"
fi
}
@@ -254,7 +271,8 @@ function skip_if_rootless() {
####################
function skip_if_remote() {
if is_remote; then
- skip "${1:-test does not work with podman-remote}"
+ local msg=$(_add_label_if_missing "$1" "remote")
+ skip "${msg:-test does not work with podman-remote}"
fi
}