Skip to content

refactor: move gitlab integration tests to tests/integrations (#901)#917

Merged
muddlebee merged 1 commit intoTracer-Cloud:mainfrom
sirohikartik:refactor-gitlab-tests
Apr 28, 2026
Merged

refactor: move gitlab integration tests to tests/integrations (#901)#917
muddlebee merged 1 commit intoTracer-Cloud:mainfrom
sirohikartik:refactor-gitlab-tests

Conversation

@sirohikartik
Copy link
Copy Markdown
Contributor

@sirohikartik sirohikartik commented Apr 25, 2026

Fixes #901

Describe the changes you have made in this PR -

This PR fulfills the acceptance criteria by relocating the GitLab integration test suite to sit alongside the rest of the integration tests.

  • Moved app/integrations/gitlab_test.py to tests/integrations/test_gitlab.py using git mv to preserve file history.
  • Verified that all 40 tests still collect and pass successfully in the new location without needing any import updates.

Screenshots of the UI changes (If any) -

N/A - backend refactoring only.


Code Understanding and AI Usage

Did you use AI assistance (ChatGPT, Claude, Copilot, etc.) to write any part of this code?

  • No, I wrote all the code myself
  • Yes, I used AI assistance (continue below)

Explain your implementation approach:

  • What problem does your code solve? It moves the inline GitLab integration tests out of the app/ directory and into the tests/integrations/ directory to match the repository's standard structure.
  • Why did you choose this specific implementation? I used git mv to move the file and renamed it to test_gitlab.py so that pytest auto-discovers it. The suite was run post-move to ensure 100% test passing and coverage retention.

Checklist before requesting a review

  • I have added proper PR title and linked to the issue
  • I have performed a self-review of my code
  • I can explain the purpose of every function, class, and logic block I added
  • I understand why my changes work and have tested them thoroughly
  • I have considered potential edge cases and how my code handles them
  • If it is a core feature, I have added thorough tests
  • My code follows the project's style guidelines and conventions

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 25, 2026

Greptile Summary

This PR moves app/integrations/gitlab_test.pytests/integrations/test_gitlab.py via git mv, with zero code modifications. The new location follows the project's standard tests/ structure and the test_*.py naming convention that pytest auto-discovers. Per the project's testing guide, both co-located (app/) and tests/ placements are valid, so this is a clean structural alignment with no functional risk.

The PR description body still contains the unfilled template placeholder Fixes #[ISSUE_NUMBER] — the quality guide requires a proper issue link (Fixes #123). The linked issue (#901) is visible in the PR title, but updating the description body would complete the checklist requirement.

Confidence Score: 5/5

Safe to merge — pure file rename with no code changes and no functional risk.

The only change is a file move. All 40 tests are structurally identical to before, imports resolve correctly from the new location, and the placement matches the project's testing conventions. The only open item is the unfilled PR description placeholder, which is a process nit and does not affect code correctness.

No files require special attention.

Important Files Changed

Filename Overview
tests/integrations/test_gitlab.py Renamed from app/integrations/gitlab_test.py; pure move with no code changes — 40 unit tests intact and correctly placed in the tests/integrations/ directory

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["app/integrations/gitlab_test.py\n(old location)"] -->|"git mv"| B["tests/integrations/test_gitlab.py\n(new location)"]
    B --> C["pytest auto-discovery\nvia test_*.py naming"]
    C --> D["40 tests collected & passing"]
    
    style A fill:#f9a,stroke:#c77,stroke-dasharray:5
    style B fill:#9f9,stroke:#696
    style D fill:#9cf,stroke:#36a
Loading

Reviews (1): Last reviewed commit: "refactor: move gitlab integration tests ..." | Re-trigger Greptile

@sirohikartik
Copy link
Copy Markdown
Contributor Author

Hi! Just a heads up, the CI pipeline failed, but it looks like an unrelated failure on main. My GitLab tests passed, but tests/nodes/plan_actions/test_node_plan_actions.py is failing with an AttributeError on a mock missing model_copy. Let me know if you need me to rebase once main is patched!

@muddlebee
Copy link
Copy Markdown
Collaborator

@sirohikartik pls check CI, seems to be related to your change?? check the logs https://github.com/Tracer-Cloud/opensre/actions/runs/24923327480/job/72988859074?pr=917

FAILED tests/nodes/plan_actions/test_node_plan_actions.py::test_node_plan_actions_emits_retrieval_controls - AttributeError: '_InputStub' object has no attribute 'model_copy'
======= 1 failed, 3248 passed, 2 skipped, 1 xfailed, 1 warning in 53.75s =======
Error: Process completed with exit code 1.

@muddlebee
Copy link
Copy Markdown
Collaborator

CI is green in main

@sirohikartik sirohikartik force-pushed the refactor-gitlab-tests branch from 9b76eb9 to 71ed8a2 Compare April 28, 2026 07:47
@sirohikartik
Copy link
Copy Markdown
Contributor Author

Hey @muddlebee , I just synced the branch with the latest main. I think this is ready to get merged. Thanks!

@muddlebee muddlebee merged commit 16a81dd into Tracer-Cloud:main Apr 28, 2026
7 checks passed
@muddlebee
Copy link
Copy Markdown
Collaborator

muddlebee commented Apr 28, 2026

@sirohikartik thanks ✨

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.

Move app/integrations/gitlab_test.py into tests/integrations/

2 participants