hack/test/unit: use empty default values

Commit 8013d80c2 updated the hack/test/unit script to ensure that tests
are run against the right module when TESTDIRS is specified. But there's
an issue with this commit: the script has `set -u` (i.e. 'nounset'), and
some variables are set conditionally, but checked unconditionally, so it
fails.

Fix it by defining those vars to empty strings.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
Albin Kerouanton
2025-08-15 10:49:32 +02:00
parent a34c4d9bb9
commit ff8364a39f

View File

@@ -16,6 +16,9 @@ BUILDFLAGS=(-tags 'netgo journald')
TESTFLAGS+=" -test.timeout=${TIMEOUT:-5m}"
TESTDIRS="${TESTDIRS:-./...}"
: "${api_pkg_list:=}"
: "${client_pkg_list:=}"
mkdir -p bundles
case "$TESTDIRS" in