Skip to content

test: reduce and improve tests in src/compile/types.rs#696

Merged
jamesadevine merged 1 commit into
mainfrom
test-reducer/types-2026-05-22-cba3b024dff2b83c
May 22, 2026
Merged

test: reduce and improve tests in src/compile/types.rs#696
jamesadevine merged 1 commit into
mainfrom
test-reducer/types-2026-05-22-cba3b024dff2b83c

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Test Suite Reduction: src/compile/types.rs

What was wrong

  • test_engine_config_id_defaults_to_copilot: duplicate of test_engine_config_full_object_partial_fields — both assert engine_id() defaults to "copilot" when id is omitted from the object form; the removed test is a strict subset.
  • test_azure_devops_not_set: incorrect — tested fm.tools.is_none() (no tools field at all) instead of fm.tools.azure_devops.is_none() (azure-devops absent within tools). Would not catch a regression where azure-devops unexpectedly appeared.
  • test_network_config_rejects_arbitrary_unknown_field: low-value — only asserted is_err() without checking the error message, unlike its sibling test_network_config_rejects_old_allow_field which verifies the message content.
  • test_lean_bool_false: incomplete — only asserted !lean.is_enabled(); missed verifying toolchain().is_none() for complete state coverage.
  • test_pr_trigger_config_combined_with_pipeline_trigger: vacuous — tc.pipeline.is_some() and tc.pr.is_some() are trivially true since the YAML input literally sets both; replaced with value assertions on pipeline.name and the filter pattern.

Changes

Test Action Reason
test_engine_config_id_defaults_to_copilot Removed Duplicate/subset of test_engine_config_full_object_partial_fields
test_azure_devops_not_set Rewritten Incorrect — tested wrong condition for its name
test_network_config_rejects_arbitrary_unknown_field Strengthened Add error message assertion
test_lean_bool_false Strengthened Add toolchain().is_none() check
test_pr_trigger_config_combined_with_pipeline_trigger Fixed Replace vacuous is_some() with value assertions

Verification

  • cargo test: all 1661 + integration tests pass ✅
  • cargo check: no errors ✅

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • dev.azure.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "dev.azure.com"

See Network Configuration for more information.

Generated by Test Reducer · ● 16.3M ·

- Remove test_engine_config_id_defaults_to_copilot: duplicate of
  test_engine_config_full_object_partial_fields (both assert engine_id
  defaults to 'copilot' when id is omitted — identical coverage)
- Fix test_azure_devops_not_set: was testing 'no tools field at all'
  (fm.tools.is_none()) instead of 'azure-devops absent within tools';
  rewritten to match test_cache_memory_not_set pattern
- Strengthen test_network_config_rejects_arbitrary_unknown_field: add
  error message assertion to match its sibling test
- Strengthen test_lean_bool_false: add toolchain().is_none() assertion
  for complete state verification
- Fix test_pr_trigger_config_combined_with_pipeline_trigger: replace
  vacuous tc.pipeline.is_some() / tc.pr.is_some() with value assertions
  on pipeline.name and the filter pattern

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine marked this pull request as ready for review May 22, 2026 13:29
@jamesadevine jamesadevine merged commit 9a97673 into main May 22, 2026
@jamesadevine jamesadevine deleted the test-reducer/types-2026-05-22-cba3b024dff2b83c branch May 22, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant