Repository navigation
test(server): pin the queen export route and bundle helper - createQueenExportRoute (Closes #1676) - #1934
Conversation
β¦eenExportRoute The first suite for queen-export.ts: the route and the exported bundleOfBranch helper exercised (7 tests) against a real throwaway git repository steered through the WORKSPACE_DIR / TRIOS_REPO_URL / TRIOS_REPO_REF overrides - real git, real bundles verified by git bundle verify, no mock.module, no database (the stored-bundle fallback is measured inert without DATABASE_URL), no network, no container; the subject is untouched. Closes #1676
Summary by t27-beesThis PR adds a test suite that pins the behavior of Worth a look
Read: 1 files, +192 -0, the whole diff. Head |
β Tests passed β 3560/3630
|
|
Checks note, before merge:
Dmitrii Fedorov (@dmitrii-f-t27) |
Closes #1676
What changed
One new file:
trios/agent-server/apps/server/tests/api/queen-export.test.ts(the path the issue's Success Criteria names). The subjectqueen-export.tsis untouched.The single exported route factory and the exported
bundleOfBranchhelper are exercised (7it(blocks) against a real throwaway git repository steered through theWORKSPACE_DIR/TRIOS_REPO_URL/TRIOS_REPO_REFenvironment overrides (restored in anafterAll):bundleOfBranch(3 tests): 404 for a branch this checkout does not hold (pinned error text); 409 for a branch level with the base; and the ok case - branch, base, the commit list (sha, author, date, subject), the file list, and bytes that are a REAL bundle proven bygit bundle verifyagainst the same checkout (the singular wording measured on this git).# v); GET /abc answers 400 with the pinned message; GET /999 answers 404 (the stored-bundle fallback is inert without DATABASE_URL - measured).The suite registers no mock.module at all and touches nothing outside its mkdtempSync tree, so it cannot affect sibling suites. No network, no database, no container.
How it was verified (FR-004)
7 pass / 0 fail / 30 expect() calls, Ran 7 tests across 1 file(~0.5 s).4 failout of 7, quoted raw above. The subject was restored byte-identical (git checkout) and the suite passes again.The bundle contains this ref:), the branch topology (a branch cut from another work branch counts both commits), and a subarray length. The file isbiome ci-clean and contributes no typecheck error (local monorepo typecheck: base set, 0 mentions of the new file).Not verified
Tests / server-apijob re-runs the suite on this SHA.Dmitrii Fedorov (@dmitrii-f-t27)