crosscode: Events 3.0 builds auth-client; tests on real Postgres
- scripts/products/events.sh: packages/auth-client is installed and built (after contracts) when Events uses it, as 3.0.0 does; without it a 3.0 deploy would fail at the first sign-in through Accounts. bats test. - test:accounts runs on real Postgres for both apps with EVENTS_TEST_DATABASE_URL and ACCOUNTS_TEST_DATABASE_URL (14/14); the Accounts test harness takes a real Prisma client. - e2e/excel.spec.ts resolves excelts from the backend (hoisted in the monorepo), so the e2e suite loads again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,8 +15,9 @@ setup() {
|
||||
|
||||
checkout() {
|
||||
local dir="$TMP/$1"; shift
|
||||
mkdir -p "$dir/apps/events/backend" "$dir/apps/events/frontend" "$dir/packages/contracts" "$dir/packages/seo"
|
||||
mkdir -p "$dir/apps/events/backend" "$dir/apps/events/frontend" "$dir/packages/contracts" "$dir/packages/seo" "$dir/packages/auth-client"
|
||||
echo '{"name":"@crosscode/contracts"}' > "$dir/packages/contracts/package.json"
|
||||
echo '{"name":"@crosscode/auth-client"}' > "$dir/packages/auth-client/package.json"
|
||||
echo '{"name":"@crosscode/seo"}' > "$dir/packages/seo/package.json"
|
||||
printf '{"dependencies":{%s}}' "$1" > "$dir/apps/events/backend/package.json"
|
||||
printf '{"dependencies":{%s}}' "$2" > "$dir/apps/events/frontend/package.json"
|
||||
@@ -35,6 +36,17 @@ checkout() {
|
||||
[ "$(cut -d'|' -f2 "$CALLS" | tr '\n' ' ')" = "new/packages/contracts new/packages/seo new/apps/events/backend new/apps/events/frontend " ]
|
||||
}
|
||||
|
||||
@test "3.0.0: auth-client is installed and built after contracts, before Events" {
|
||||
checkout new '"@crosscode/auth-client":"*","@crosscode/contracts":"*"' '"@crosscode/contracts":"*","@crosscode/seo":"*"'
|
||||
run events_shared_packages "$TMP/new"
|
||||
[ "$output" = $'packages/contracts
|
||||
packages/auth-client
|
||||
packages/seo' ]
|
||||
events_build "$TMP/new" hope
|
||||
[ "$(cut -d'|' -f2 "$CALLS" | tr '
|
||||
' ' ')" = "new/packages/contracts new/packages/auth-client new/packages/seo new/apps/events/backend new/apps/events/frontend " ]
|
||||
}
|
||||
|
||||
@test "2.3.x (no shared packages used): installed and built as before" {
|
||||
checkout old '' ''
|
||||
run events_shared_packages "$TMP/old"
|
||||
|
||||
Reference in New Issue
Block a user