Repository navigation
test: clean integration fixtures and report failures as they happen - #9
Merged
Merged
Conversation
Integration tests install a full node_modules for every chain fixture and the teardown that removed test-output/ was commented out, so one run left about 17GB on disk. Remove each installed project when its suite finishes, and clear test-output/ at the start and end of a Vitest run.
SKALE projects advertise their own CAIP-2 id, so assert each chain's configured x402Network. Readiness starts at port 20000, keeps probing after the listen banner, and stop() kills the process group. Skip booting the 4mica server. Its scheme has no paymentFlows, and the facilitator advertises Ethereum Sepolia only as x402 v1. Static checks still run.
The default reporter only prints the stack after every file finishes. A long integration run shows a failed count in the live footer and leaves out the file name and the error.
KEEP_TEST_OUTPUT=1 returned before the path check, so removing the output root or a path outside it succeeded instead of throwing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npm run test:integrationwas leaving a fullnode_modulestree for every generated chain fixture under gitignoredtest-output/. That is the ~17GB, not an npm or Vitest cache that grows on every identical re-run.Each chain file installs dependencies for its A2A, streaming, and MCP projects, and x402 chains install one more. Twelve chains is about 43 installs of
agent0-sdkand the rest of a generated project. Re-running replaces those same directory names, so the folder stays at the size of one full run instead of doubling. It never shrinks, becausecleanupTestOutput()existed and was commented out. A renamed fixture would also be left behind forever.This change:
test-output/at the start and end of every Vitest run, so a killed run cannot pile up on the next one.KEEP_TEST_OUTPUT=1.The fast suite (
npm test, 113 tests) passes. The next integration run on a machine that still has the old tree will spend time deleting it at startup, then keep only one install at a time.Test plan
npm testnpm run test:integrationon a machine where the disk cost is acceptable (installs every chain fixture, then deletes each one)KEEP_TEST_OUTPUT=1 npm testleavestest-output/in placeSummary
npm run test:integrationwas leaving a fullnode_modulestree for every generated chain fixture under gitignoredtest-output/. That is the ~17GB, not an npm or Vitest cache that grows on every identical re-run.Each chain file installs dependencies for its A2A, streaming, and MCP projects, and x402 chains install one more. Twelve chains is about 43 installs of
agent0-sdkand the rest of a generated project. Re-running replaces those same directory names, so the folder stays at the size of one full run instead of doubling. It never shrinks, becausecleanupTestOutput()existed and was commented out. A renamed fixture would also be left behind forever.This change:
test-output/at the start and end of every Vitest run, so a killed run cannot pile up on the next one.KEEP_TEST_OUTPUT=1.The fast suite (
npm test, 113 tests) passes. The next integration run on a machine that still has the old tree will spend time deleting it at startup, then keep only one install at a time.Integration failures
The same integration run then failed in four places:
x402Network(eip155:1187947933andeip155:324705682). The second shared regex only accepted Base, Polygon, and Ethereum Sepolia.stop()kills the detached process group, so thetsxgrandchild cannot keep the port after the suite deletes the project.@4mica/[email protected]has nopaymentFlows, so current@x402/corethrows during route validation.https://x402.4mica.xyz/supportedlistseip155:11155111only as x402 v1, and core requires v2. Dependency, middleware, and network checks still run. The live 402 and paid-request cases are skipped for 4mica.Test plan
npm testnpx vitest run --config vitest.integration.config.ts tests/chains/eth-sepolia.test.ts -t "x402 Payments"(4 passed, 23 skipped)npm run test:integrationon a machine where the disk cost is acceptable (installs every chain fixture, then deletes each one)KEEP_TEST_OUTPUT=1 npm testleavestest-output/in place