test: correct mislabelled test in src/audit/analyzers/jobs.rs#883
Merged
jamesadevine merged 1 commit intoJun 7, 2026
Merged
Conversation
timeline_to_jobs_parses_real_ado_shape claimed to validate "real ADO shape" parsing but only asserted on jobs.len() and name ordering — both already covered by the filtering and sorting tests. The test setup provides complete job data (result, startTime, finishTime, id, parentId) but none of those fields were verified, meaning regressions in field parsing would go undetected. Add assertions for status, result, duration, started_at, and finished_at on the first parsed job, and add a comment clarifying that extra ADO fields (id, parentId) are silently ignored. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Test Suite Reduction:
src/audit/analyzers/jobs.rsWhat was wrong
timeline_to_jobs_parses_real_ado_shape— the test name promises to validate "real ADO shape" parsing, but the body only assertedjobs.len() == 3and the order of job names. Those two assertions are already covered by:timeline_to_jobs_filters_non_job_records(count check)timeline_to_jobs_sorts_by_start_time(ordering check)The test sets up rich, realistic data — completed jobs with
result,startTime,finishTime,id, andparentId— but none of the parsed field values were verified. A regression inresult,duration,status,started_at, orfinished_atparsing would go undetected.Changes
timeline_to_jobs_parses_real_ado_shapeAdded assertions for the first parsed job:
status == "completed"result == Some("succeeded")duration == Some("1m 0s")started_at == Some("2026-01-01T00:00:00Z")finished_at == Some("2026-01-01T00:01:00Z")Also added a comment clarifying that extra ADO fields (
id,parentId) must be silently ignored.Verification
cargo test: all 1748 tests pass ✅cargo clippy --all-targets --all-features: no warnings ✅Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
spsprodeus21.vssps.visualstudio.comspsprodweu4.vssps.visualstudio.comSee Network Configuration for more information.