From 387cc99486bc73971d0fa11e478aeacad59d0f99 Mon Sep 17 00:00:00 2001 From: Rongsong Shen Date: Sat, 10 Oct 2026 10:32:04 +0000 Subject: [PATCH] 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) --- src/tools/xce-build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tools/xce-build.sh b/src/tools/xce-build.sh index 4ed966ec..15841679 100755 --- a/src/tools/xce-build.sh +++ b/src/tools/xce-build.sh @@ -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 ;;