aboutsummaryrefslogtreecommitdiff
path: root/test/upgrade/helpers.bash
blob: 16fedb053bc1f296838091f1f29c51730ee20363 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- bash -*-

load "../system/helpers"

setup() {
    :
}

teardown() {
    :
}

# skip a test when the given version is older than the currently tested one
skip_if_version_older() {
    # use ${PODMAN_UPGRADE_FROM##v} to trim the leading "v"
    if printf '%s\n%s\n' "${PODMAN_UPGRADE_FROM##v}" "$1" | sort --check=quiet --version-sort; then
        skip "${2-test is only meaningful when upgrading from $1 or later}"
    fi
}