Commit ab2cf340 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

tests: fix undefined variable error

parent b889d478
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -22,9 +22,7 @@ function teardown() {
}

@test "tool availability" {
    set +u
    if [[ -n "$CI_PROJECT_DIR" ]]; then
        run apk add git bash xq xmlstarlet
    fi
    set -u
}
+2 −1
Original line number Diff line number Diff line
#!/usr/bin/env bash

# prevent undefined variables from failing tests (might not be the default in all cases)
set +u
if [[ -f ${CI_PROJECT_DIR:-.}/script.sh ]]; then
    source "${CI_PROJECT_DIR:-.}/script.sh"
else