Add test: dry-run quarantines failing tests without uploading - #1155
Merged
Conversation
Covers the combination of --dry-run with quarantining enabled: a failing test marked for quarantine by the server overrides the exit code to 0, the quarantine-config endpoint is the only request made (no bundle upload or telemetry), and the locally written meta.json records the quarantined test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details. |
max-trunk
approved these changes
Aug 10, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1155 +/- ##
==========================================
+ Coverage 82.97% 83.33% +0.36%
==========================================
Files 71 71
Lines 16044 16044
==========================================
+ Hits 13312 13371 +59
+ Misses 2732 2673 -59 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
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
Adds
dry_run_quarantines_failing_test_without_uploadingtocli/tests/upload.rs, covering a previously untested combination:upload --dry-runwith quarantining enabled.The only existing dry-run test (
upload_bundle_using_dry_run) explicitly disables quarantining and uses all-passing fixtures, so nothing pinned down the behavior of using dry-run to quarantine without uploading.What it verifies
--dry-run(the same failing JUnit produces a failure exit code inuses_failure_exit_code_if_unquarantined_tests_failwhen nothing is quarantined).GetQuarantineConfig.CreateBundleUpload,S3Upload, orTelemetryUploadMetricsrequests are made.meta.jsonrecords the quarantined test by name.The mock quarantine handler records its request into
state.requests(the stock closure handlers used elsewhere don't), so the test can assert the quarantine query is the only network call.Test plan
cargo test -p trunk-analytics-cli --test upload dry_run_quarantines_failing_test_without_uploadingpasses locally.🤖 Generated with Claude Code