build: fix ShellCheck issue in scripts/test-go.sh

With the updated Fedora 37 container-image, a new version of ShellCheck
gets installed. This version is a little more strict and complains about
the array expansion in `scripts/test-go.sh`.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
(cherry picked from commit 93d32c49c8)
This commit is contained in:
Niels de Vos 2022-11-15 18:31:30 +01:00 committed by mergify[bot]
parent ad00b3a5d3
commit 72e67d7da5

View File

@ -21,7 +21,7 @@ failed=0
for gopackage in ${GOPACKAGES}; do
echo "--- testing: ${gopackage} ---"
# shellcheck disable=SC2086
go test "${GO_TAGS}" "${MOD_VENDOR}" -v ${GOTESTOPTS[*]} "${gopackage}" || ((failed += 1))
go test "${GO_TAGS}" "${MOD_VENDOR}" -v "${GOTESTOPTS[@]}" "${gopackage}" || ((failed += 1))
if [[ -f cover.out ]]; then
# Append to coverfile
grep -v "^mode: count" cover.out >>"${COVERFILE}"