fix(build): run every apiserver Go test package in xce-build.sh (bug-1965)

Cause: the apiserver and all components ran go test on a fixed list
(./store/... ./utils/... ./controllers/... ./backend/...), so the
middleware, router, cmd and models tests (several security tests among
them) never ran in /xce-build; a deliberately broken middleware test left
the build green.

Fix: run ./... (vendor/ is excluded by the pattern) in both places.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-10 10:32:04 +00:00
parent f7fef278f6
commit 387cc99486
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C

View file

@ -392,7 +392,9 @@ case "$COMPONENT" in
# `go test` only short-circuited the list -- set -e ignores every
# command of an && list but the last -- so the build reported
# success and skipped the xcecli tests.
(cd frontend/apiserver && CGO_ENABLED=0 go test "${GO_TEST_JOB_OPTS[@]}" ./store/... ./utils/... ./controllers/... ./backend/... -count=1)
# bug-1965: every apiserver package (./... skips vendor/); a fixed
# list had left out middleware, router, cmd and models.
(cd frontend/apiserver && CGO_ENABLED=0 go test "${GO_TEST_JOB_OPTS[@]}" ./... -count=1)
(cd frontend/xcecli && CGO_ENABLED=0 go test "${GO_TEST_JOB_OPTS[@]}" ./... -count=1)
fi
;;
@ -445,7 +447,9 @@ case "$COMPONENT" in
# `go test` only short-circuited the list -- set -e ignores every
# command of an && list but the last -- so the build reported
# success and skipped the xcecli tests.
(cd frontend/apiserver && CGO_ENABLED=0 go test "${GO_TEST_JOB_OPTS[@]}" ./store/... ./utils/... ./controllers/... ./backend/... -count=1)
# bug-1965: every apiserver package (./... skips vendor/); a fixed
# list had left out middleware, router, cmd and models.
(cd frontend/apiserver && CGO_ENABLED=0 go test "${GO_TEST_JOB_OPTS[@]}" ./... -count=1)
(cd frontend/xcecli && CGO_ENABLED=0 go test "${GO_TEST_JOB_OPTS[@]}" ./... -count=1)
fi
;;