You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(e2e): drop alpine literals, skip local-only verifier, modernize id check, expand purge to cpu=999
Five wins toward a green e2e suite on Tokyo:
1. test_quota_enforcement.py + test_error_code_mapping.py: every
hardcoded 'alpine:3.23' literal in a POST body switched to
conftest.DEFAULT_IMAGE. The alpine string was rejected by the API
image allowlist (HTTP 400 'Unsupported image') before reaching the
actual cpu/memory/disk quota check, so each xfail-strict case
passed-by-accident and tripped XPASS(strict). Sending the curated
ghcr digest lets the request reach the quota path the test is
meant to pin — which still silently clamps, so the cases now
fail as expected and xfail captures them.
2. test_path_verification.py: module-level skipif when
BOXLITE_E2E_PROFILE != 'default'. Both cases are LOCAL meta-tests
(one greps credentials.toml for url=:3000, the other reads the
boxlite-runner systemd journal) and can never succeed on the
Tokyo cloud profile.
3. test_lifecycle::test_create_generates_unique_ids: post-#735 box
ids are 12-char alphanumeric (BOX_ID_REGEX), no longer the
5-segment uuid the assertion was checking.
4. ci/e2e-cloud-test.yml purge step extends to rows whose cpu equals
the over-quota literal (999) the XPASS tests POSTed back when the
API didn't enforce. Those rows are still in the box table and
blow up every list_info round-trip because the Python SDK types
BoxInfo.cpus as u8 ('invalid value: integer 999, expected u8').
The 999 literal is provably from test pollution — way past
max_cpu_per_box=4 and the ADMIN_TOTAL_CPU_QUOTA=32 envelope.
5. .gitignore: add .claude/.pr-reviewed.json so the claude
review-state file isn't accidentally staged into review commits.
# so every test_list_info* that round-trips the response
262
+
# blows up with `invalid value: integer 999, expected u8`.
263
+
#
264
+
# Surgical, provably-test-only scope on the admin's default org:
265
+
# - the fixture name
266
+
# - the exact literal cpu value the over-quota cases POST
267
+
# (999 — way outside max_cpu_per_box=4 and the
268
+
# ADMIN_TOTAL_CPU_QUOTA=32 envelope, so it cannot be
269
+
# legitimate state).
270
+
# box_last_activity / ssh_access cascade-delete via FK.
260
271
run: |
261
272
set -euo pipefail
262
273
CLUSTER="${{ steps.resources.outputs.cluster }}"
@@ -271,15 +282,15 @@ jobs:
271
282
if [ "$TD" = "$PRIMARY_TD" ]; then echo "$arn"; break; fi
272
283
done)
273
284
[ -n "$TASK" ] || { echo "::error::No Api task on PRIMARY deployment"; exit 1; }
274
-
SQL='DELETE FROM "box" WHERE "name" = '\''e2e-test-box'\'' AND "organizationId" = (SELECT "organizationId" FROM "organization_user" WHERE "userId" = '\''boxlite-admin'\'' AND "isDefaultForUser" = true LIMIT 1); SELECT count(*) FROM "box" WHERE "name" = '\''e2e-test-box'\'' AND "organizationId" = (SELECT "organizationId" FROM "organization_user" WHERE "userId" = '\''boxlite-admin'\'' AND "isDefaultForUser" = true LIMIT 1);'
285
+
SQL='DELETE FROM "box" WHERE "organizationId" = (SELECT "organizationId" FROM "organization_user" WHERE "userId" = '\''boxlite-admin'\'' AND "isDefaultForUser" = true LIMIT 1) AND ("name" = '\''e2e-test-box'\'' OR "cpu" = 999); SELECT count(*) FROM "box" WHERE "organizationId" = (SELECT "organizationId" FROM "organization_user" WHERE "userId" = '\''boxlite-admin'\'' AND "isDefaultForUser" = true LIMIT 1) AND ("name" = '\''e2e-test-box'\'' OR "cpu" = 999);'
0 commit comments