test: reduce and improve tests in src/compile/types.rs#696
Merged
jamesadevine merged 1 commit intoMay 22, 2026
Conversation
- 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>
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/compile/types.rsWhat was wrong
test_engine_config_id_defaults_to_copilot: duplicate oftest_engine_config_full_object_partial_fields— both assertengine_id()defaults to"copilot"whenidis omitted from the object form; the removed test is a strict subset.test_azure_devops_not_set: incorrect — testedfm.tools.is_none()(no tools field at all) instead offm.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 assertedis_err()without checking the error message, unlike its siblingtest_network_config_rejects_old_allow_fieldwhich verifies the message content.test_lean_bool_false: incomplete — only asserted!lean.is_enabled(); missed verifyingtoolchain().is_none()for complete state coverage.test_pr_trigger_config_combined_with_pipeline_trigger: vacuous —tc.pipeline.is_some()andtc.pr.is_some()are trivially true since the YAML input literally sets both; replaced with value assertions onpipeline.nameand the filter pattern.Changes
test_engine_config_id_defaults_to_copilottest_engine_config_full_object_partial_fieldstest_azure_devops_not_settest_network_config_rejects_arbitrary_unknown_fieldtest_lean_bool_falsetoolchain().is_none()checktest_pr_trigger_config_combined_with_pipeline_triggeris_some()with value assertionsVerification
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.comSee Network Configuration for more information.