refactor(tests): move detect_sources GitLab tests into tests/nodes/plan_actions/#959
Conversation
…an_actions/ Merges app/nodes/plan_actions/detect_sources_test.py into tests/nodes/plan_actions/test_detect_sources.py and removes the inline copy. All merge_request_iid assertions are preserved unchanged. Closes Tracer-Cloud#902.
Greptile SummaryThis PR consolidates the GitLab Confidence Score: 5/5Safe to merge — pure test consolidation with no logic changes All five test assertions are preserved verbatim, the destination file already had No files require special attention Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["app/nodes/plan_actions/detect_sources_test.py\n(deleted)"] -->|"5 GitLab tests migrated"| B["tests/nodes/plan_actions/test_detect_sources.py\n(consolidated)"]
B --> C["test_detect_sources_includes_honeycomb_from_resolved_integrations"]
B --> D["test_detect_sources_includes_coralogix_with_scoped_default_query"]
B --> E["test_detect_sources_includes_openclaw_when_resolved"]
B --> F["test_detect_sources_gitlab_extracts_mr_iid_from_annotations"]
B --> G["test_detect_sources_gitlab_mr_iid_empty_when_not_in_alert"]
B --> H["test_detect_sources_gitlab_mr_iid_strips_whitespace"]
B --> I["test_detect_sources_gitlab_not_added_when_no_project_id"]
B --> J["test_detect_sources_gitlab_not_added_when_no_integration"]
Reviews (1): Last reviewed commit: "refactor(tests): move detect_sources Git..." | Re-trigger Greptile |
|
@VaibhavUpreti @rrajan94 kindly review |
|
Verified locally: pure test relocation. The 5 GitLab merge_request_iid tests move byte-identical from app/nodes/plan_actions/detect_sources_test.py to tests/nodes/plan_actions/test_detect_sources.py (with one comment clarification: no project_id → no gitlab_project in alert). No production imports of the old path. Matches the AGENTS.md rule and closes #902. LGTM. FYI: three more inline *_test.py files remain in app/ for follow-up app/cli/deploy_test.py, app/integrations/gitlab_test.py, app/tools/utils/log_compaction_test.py. |
Fixes #902
Describe the changes you have made in this PR -
Moved the GitLab
merge_request_iidtests from the inline fileapp/nodes/plan_actions/detect_sources_test.pyintotests/nodes/plan_actions/test_detect_sources.py, where all otherdetect_sourcestests already live. The inline file was then deleted.Since
test_detect_sources.pyalready existed with honeycomb/coralogix/openclawtests, the GitLab tests were appended to that file rather than creating a
duplicate. All five assertions are preserved exactly — no behavior was changed.
Demo/Screenshot
Code Understanding and AI Usage
Did you use AI assistance (ChatGPT, Claude, Copilot, etc.) to write any part of this code?
If you used AI assistance:
Explain your implementation approach:
Checklist before requesting a review
Note: Please check Allow edits from maintainers if you would like us to assist in the PR.