fix: move app/cli/deploy_test.py into tests/cli/#1018
fix: move app/cli/deploy_test.py into tests/cli/#1018muddlebee merged 3 commits intoTracer-Cloud:mainfrom
Conversation
Part of Tracer-Cloud#899 — moves inline app/cli/deploy_test.py into the tests/ tree.
Greptile SummaryThis PR relocates 20+ Railway deploy tests from
Confidence Score: 4/5Not safe to merge until mid-file imports are hoisted to the top of the file to satisfy ruff E402/F811. The relocation logic and test content are correct, but the import placement will break make lint (CI-enforced). This is a straightforward fix — move and deduplicate imports at the top of the file — so the score is 4 rather than lower. tests/cli/test_deploy.py — imports block starting at line 539 needs to be merged into the top-level import section. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[app/cli/deploy_test.py\n517 lines — DELETED] -->|tests relocated| B[tests/cli/test_deploy.py]
B --> C[Existing EC2 + LangSmith tests\nlines 1–147]
B --> D[Separator comment block\n+ mid-file imports ⚠️\nlines 534–549]
D --> E[TestIsRailwayCliInstalled]
D --> F[TestGetRailwayAuthStatus]
D --> G[TestExtractRailwayUrl]
D --> H[TestDeployToRailway]
D --> I[TestRunDeploy]
D --> J[TestDeployCommand]
style D fill:#f96,stroke:#c00
Reviews (1): Last reviewed commit: "fix: delete app/cli/deploy_test.py after..." | Re-trigger Greptile |
|
@Ghraven thank you looks good. |
|
Thank you, @muddlebee! 😊 Really appreciate you taking the time to review. I've also fixed the greptile P1 lint issue (duplicate imports mid-file) so the CI should pass now. |
Closes #899
What
Moves the inline
app/cli/deploy_test.py(20+ Railway deploy tests) into the propertests/cli/tree and deletes the original file.Changes
tests/cli/test_deploy.py— expanded with all Railway deploy tests fromapp/cli/deploy_test.py, merged after the existing EC2 health check testapp/cli/deploy_test.py— deletedWhy
Inline tests inside
app/are harder for contributors to discover and maintain. All test coverage is now in one place undertests/cli/and theapp/package no longer contains test files.Test coverage preserved
All existing assertions from both files are retained — no tests were removed or modified, only relocated. Coverage for
is_railway_cli_installed,get_railway_auth_status,_extract_railway_url,deploy_to_railway(happy path + error paths),run_deploy, and the ClickdeployCLI command are all present.