test(19.7-09): the gate requires the plan 08 plugin, site and demo tests
- USER_SHORT_TESTS (TestMemberTokenScopesBoot, GOWORK=off -short) in the plugins stage; USER_TESTS, OAS_TESTS, JOURNAL_SHORT_TESTS and DEMO_TESTS gain the gap-closure tests and the plan 08 smokes - consumers stage: the demo site's vitest run with VUE_FILES (app/lib/linkCode.test.ts) required, through detect_vitest - docs stage: cooler's KeyPrefix and keyPrefix carry their own doc comments (A-IN-02) - self-test cases for the demo site's required file
This commit is contained in:
@@ -22,16 +22,18 @@
|
||||
# plugin's last commit before the phase).
|
||||
# consumers the applications at their bumped pins (D-31): the workspace
|
||||
# check, go build ./... and go test -short ./... in each, the
|
||||
# demo also with -tags summercms_mcp, its pin check and its
|
||||
# deploy check (the nginx locations of the MCP endpoint); the
|
||||
# applications that use the user plugin are also built against
|
||||
# USER_PLUGIN through a scratch copy of their go.work.
|
||||
# demo also with -tags summercms_mcp, its pin check, the demo
|
||||
# site's vitest run (VUE_FILES must pass) and its deploy check
|
||||
# (the nginx locations of the MCP endpoint); the applications
|
||||
# that use the user plugin are also built against USER_PLUGIN
|
||||
# through a scratch copy of their go.work.
|
||||
# docker Docker host only: the Postgres suites by required name in the
|
||||
# framework (cabana), the three plugins and the demo (tagged).
|
||||
# admin npm --prefix admin run typecheck, the vitest run (the phase's
|
||||
# files must pass), scripts/check-admin-openapi.sh --check and
|
||||
# scripts/check-admin-dist.sh.
|
||||
# docs TestDocsTree, summer docs:build --check, the decision note's
|
||||
# docs cooler's KeyPrefix and keyPrefix doc comments, TestDocsTree,
|
||||
# summer docs:build --check, the decision note's
|
||||
# dependency names, the STACK rows, and no framework source,
|
||||
# README or docs page and no test file of this phase names a
|
||||
# consuming application.
|
||||
@@ -164,21 +166,34 @@ ADMIN_FILES=(
|
||||
# (D-04: existing payloads unchanged).
|
||||
ACCOUNT_BASE="51d088a"
|
||||
|
||||
# plugins stage: Docker-free tests by required name. The user plugin has
|
||||
# none (its suites need Postgres and run in the docker stage).
|
||||
# plugins stage: Docker-free tests by required name (the user plugin's run
|
||||
# with GOWORK=off; its other suites need Postgres and run in the docker
|
||||
# stage).
|
||||
USER_SHORT_TESTS=(.:TestMemberTokenScopesBoot)
|
||||
OAS_SHORT_TESTS=()
|
||||
JOURNAL_SHORT_TESTS=(
|
||||
.:TestJournalMCPSmoke .:TestJournalMCP
|
||||
./controllers/api:TestOptionalBackendPrincipalDispatch
|
||||
.:TestJournalPromptWrites
|
||||
)
|
||||
|
||||
# docker stage: the plugins' and the demo's Postgres suites.
|
||||
USER_TESTS=(
|
||||
TestBackendLinkSmoke TestBackendLinkAdminSmoke TestUserMCPGuardSmoke TestFrontendPermissionCatalogSmoke
|
||||
TestBackendLink TestFrontendPermissionCatalog TestUserMCPGuard
|
||||
# Gap closure, plan 08 (lane C, E-1, E-2).
|
||||
TestBackendLinkAuthTime TestBackendLinkShowPost TestAccessRevocation TestMemberTokenScopes
|
||||
TestOrganisationLogo TestUserMCPGuardClientIP TestAPITokenRevokeEvent
|
||||
TestBackendLinkAuthTimeSmoke TestMemberTokenScopesSmoke
|
||||
)
|
||||
OAS_TESTS=(TestMCPTokenVerifierSmoke TestMCPConsentSmoke TestMCPTokenVerifier TestMCPConsent)
|
||||
DEMO_TESTS=(TestMCPEndToEnd)
|
||||
OAS_TESTS=(
|
||||
TestMCPTokenVerifierSmoke TestMCPConsentSmoke TestMCPTokenVerifier TestMCPConsent
|
||||
TestMCPVerifierRevocation TestMCPGrantRevocation TestMCPRevocationSmoke
|
||||
)
|
||||
DEMO_TESTS=(TestMCPEndToEnd TestMCPRevocationEndToEnd)
|
||||
|
||||
# consumers stage: the demo site's vitest files that must pass.
|
||||
VUE_FILES=(app/lib/linkCode.test.ts)
|
||||
|
||||
# docs stage: the phase's framework test files, checked for consuming
|
||||
# application names next to every non-test file under modules/ and docs/.
|
||||
@@ -591,6 +606,16 @@ run_self_test() {
|
||||
Tests 8 passed | 1 skipped (9)'
|
||||
expect_detector detect_vitest no-summary 3 ' ✓ tests/account/AccountContributions.test.ts (9 tests) 15ms'
|
||||
expect_detector detect_vitest zero 3 ' Tests 0 passed (0)'
|
||||
local vue=' ✓ app/lib/linkCode.test.ts (4 tests) 7ms
|
||||
✓ app/lib/markdown.test.ts (9 tests) 12ms
|
||||
|
||||
Test Files 2 passed (2)
|
||||
Tests 13 passed (13)'
|
||||
REQUIRE_FILES="app/lib/linkCode.test.ts" expect_detector detect_vitest vue-required-file 0 "$vue"
|
||||
REQUIRE_FILES="app/lib/linkCode.test.ts" expect_detector detect_vitest vue-missing-file 5 ' ✓ app/lib/markdown.test.ts (9 tests) 12ms
|
||||
|
||||
Test Files 1 passed (1)
|
||||
Tests 9 passed (9)'
|
||||
|
||||
# The marker rule on planted files: a caller outside pier and bouncer is
|
||||
# found, a test file and pier's own call are not.
|
||||
@@ -860,6 +885,7 @@ run_plugins() {
|
||||
workspace_check "$JOURNAL_PLUGIN"
|
||||
GO_ENV="GOWORK=off" go_vet "$USER_PLUGIN" ./...
|
||||
GO_ENV="GOWORK=off" go_short "$USER_PLUGIN" ./...
|
||||
GO_ENV="GOWORK=off" go_pkg_named "$USER_PLUGIN" "-short" "${USER_SHORT_TESTS[@]}"
|
||||
additive_check user "$USER_PLUGIN" "$USER_BASE"
|
||||
go_vet "$OAUTHSERVER_PLUGIN" ./...
|
||||
go_short "$OAUTHSERVER_PLUGIN" ./...
|
||||
@@ -893,6 +919,7 @@ run_consumers() {
|
||||
echo "build: $DEMO_APP (-tags $MCP_TAG)"
|
||||
GO_FLAGS="-tags $MCP_TAG" go_short "$DEMO_APP" ./...
|
||||
demo_pins
|
||||
vue_checked
|
||||
# T-19.7-37: the demo's vhost opens exactly the MCP paths, unbuffered.
|
||||
(cd "$DEMO_APP" && bash scripts/check-deploy.sh)
|
||||
echo "phase19.7 consumers passed"
|
||||
@@ -1013,6 +1040,25 @@ EOF
|
||||
echo "NOT RUN docker (Docker-host only; see the notice above)"
|
||||
}
|
||||
|
||||
# vue_checked runs the demo site's vitest run (pnpm --dir vue-demo-app run
|
||||
# test) and checks it with detect_vitest, requiring VUE_FILES.
|
||||
vue_checked() {
|
||||
local dir="$DEMO_APP/vue-demo-app" log rc=0 dc=0
|
||||
require_dir "$dir" "demo site"
|
||||
log="$(mktemp)"
|
||||
pnpm --dir "$dir" run test >"$log" 2>&1 || rc=$?
|
||||
REQUIRE_FILES="${VUE_FILES[*]}" detect_vitest "$log" || dc=$?
|
||||
if [[ "$rc" -ne 0 || "$dc" -ne 0 ]]; then
|
||||
grep -E '(FAIL|×|Error|expected)' "$log" | head -n 40 >&2 || true
|
||||
tail -n 20 "$log" >&2
|
||||
rm -f "$log"
|
||||
echo "refuse: pnpm run test in $dir (test=$rc detect=$dc)" >&2
|
||||
return 1
|
||||
fi
|
||||
echo "vitest (vue-demo-app): $(grep -E '^\s*Tests\s' "$log" | tr -s ' ')"
|
||||
rm -f "$log"
|
||||
}
|
||||
|
||||
# npm_checked NAME DETECT_FILES... runs npm --prefix admin run NAME and
|
||||
# checks its output with detect_vitest, requiring DETECT_FILES.
|
||||
npm_checked() {
|
||||
@@ -1067,6 +1113,19 @@ run_docs() {
|
||||
fi
|
||||
done
|
||||
echo "stack: rows for ${STACK_NAMES[*]}"
|
||||
# A-IN-02: KeyPrefix and keyPrefix carry their own doc comments.
|
||||
local doc
|
||||
doc="$(cd "$ROOT" && go doc ./modules/cooler KeyPrefix | sed -n 4p)"
|
||||
if [[ "$doc" != " KeyPrefix returns"* ]]; then
|
||||
echo "refuse: go doc cooler KeyPrefix does not open with its own comment: $doc" >&2
|
||||
return 1
|
||||
fi
|
||||
doc="$(cd "$ROOT" && go doc -u -c ./modules/cooler keyPrefix | sed -n 3,4p)"
|
||||
if [[ "$doc" != "func keyPrefix("*$'\n'" keyPrefix returns"* ]]; then
|
||||
echo "refuse: go doc -u cooler keyPrefix does not show its own comment: $doc" >&2
|
||||
return 1
|
||||
fi
|
||||
echo "cooler: KeyPrefix and keyPrefix carry their own doc comments"
|
||||
go_named "$ROOT" ./cmd/summer "" TestDocsTree
|
||||
(cd "$ROOT" && go run ./cmd/summer docs:build --check)
|
||||
local pattern hits f files=()
|
||||
|
||||
Reference in New Issue
Block a user