test: fix vacuous/incorrect indentation tests and remove 3 low-value yaml-only tests in compiler_tests#971
Draft
github-actions[bot] wants to merge 1 commit into
Conversation
…yaml-only tests in compiler_tests
- test_debug_pipeline_probe_step_indentation_standalone: the for-loop
never asserted that the displayName line was actually found, so it
silently passed even when the probe step was absent. Additionally the
search string used escaped double-quotes ("Verify MCP backends") but
the compiled YAML emits the value unquoted, and the expected indent
constant was 8 but the actual output uses 4 spaces. Rewrote to use
find()+expect() with the correct search string and indent.
- test_debug_pipeline_probe_step_indentation_1es: same two bugs.
Expected indent was 18; actual is 12. Fixed search string and constant.
- test_standalone_complete_compiled_output_is_valid_yaml: sole body was
assert_valid_yaml — merged into test_standalone_complete_agent_has_
setup_and_teardown_jobs which already compiles the same fixture.
- test_pr_filter_tier1_compiled_output_is_valid_yaml: same pattern —
merged assert_valid_yaml into test_pr_filter_tier1_has_evaluator_gate.
- test_pr_filter_tier2_compiled_output_is_valid_yaml: same pattern —
merged assert_valid_yaml into test_pr_filter_tier2_has_extension_gate.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open
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:
tests/compiler_tests.rsWhat was wrong
test_debug_pipeline_probe_step_indentation_standalone: Theforloop made no assertion when thedisplayNameline was absent — the test would silently pass even if the probe step was removed from the output entirely. Additionally, the search string useddisplayName: "Verify MCP backends"(double-quoted) but the compiled YAML emits the value unquoted (displayName: Verify MCP backends), so the line was never found. The expected indentation constant was also stale:8instead of the actual4.test_debug_pipeline_probe_step_indentation_1es: Same two bugs. Expected indent was18; actual output uses12.test_standalone_complete_compiled_output_is_valid_yaml: Sole body wasassert_valid_yaml(compile_fixture("complete-agent.md"), ...)— a single assertion on a fixture that is already compiled and more thoroughly checked bytest_standalone_complete_agent_has_setup_and_teardown_jobs.test_pr_filter_tier1_compiled_output_is_valid_yaml: Same pattern — only asserted YAML validity;test_pr_filter_tier1_has_evaluator_gatealready compiles the same fixture with richer assertions.test_pr_filter_tier2_compiled_output_is_valid_yaml: Same pattern.Changes
test_debug_pipeline_probe_step_indentation_standalonetest_debug_pipeline_probe_step_indentation_1estest_standalone_complete_compiled_output_is_valid_yamlassert_valid_yamlmerged into companion testtest_pr_filter_tier1_compiled_output_is_valid_yamlassert_valid_yamlmerged into companion testtest_pr_filter_tier2_compiled_output_is_valid_yamlassert_valid_yamlmerged into companion testVerification
cargo test: 129 passed, 0 failed ✅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.