Repository navigation
test(cli): stop updater tests sending real telemetry #2249 - #2251
Merged
Merged
Conversation
…t non-local requests #2249 Signed-off-by: Nik Cubrilovic <[email protected]>
This was referenced Nov 22, 2026
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.
Fixes #2249.
What leaked:
updater.test.tsdeletesNO_TELEMETRYinbeforeEach, but onlycaptureTelemetry()tests replacedfetch. Every other test on a signature/attestation failure or update path sent a realPOST https://api.squirrelscan.com/v1/traces.Fix:
beforeEachnow setsSQUIRREL_API_SERVER=http://127.0.0.1:9(dead local endpoint) and installs a default recordingfetchstub;afterEachrestores it.captureTelemetry()also records URLs and is otherwise unchanged.Guard:
afterEach(andafterAll) assert that no recorded request targeted a non-local host.Fail-before: with the
SQUIRREL_API_SERVERline removed, 29 tests fail, each listinghttps://api.squirrelscan.com/v1/traces(84 pass / 29 fail). With the fix: 112 pass, 0 fail.Other files that delete
NO_TELEMETRY(setup-telemetry, first-run-telemetry, install-source, telemetry, path-setup) all stubfetchin beforeEach and/or pointSQUIRREL_API_SERVERatlocalhost:9999: confirmed safe, no change.No production code changed. No docs change needed (test-only). Gates: tsgo, oxlint, oxfmt --check clean;
bun run scripts/test-suites.ts --run cli: 4661 pass, 14 skip, 0 fail;changelog.ts checkOK (no entry needed).