Skip to content

Tests add clone restore tests#687

Merged
boddumanohar merged 3 commits intodevfrom
tests-add-clone-restore-tests
Mar 24, 2026
Merged

Tests add clone restore tests#687
boddumanohar merged 3 commits intodevfrom
tests-add-clone-restore-tests

Conversation

@boddumanohar
Copy link
Copy Markdown
Member

@boddumanohar boddumanohar commented Mar 22, 2026

Branch clone and restore a branch from a backup are one of the signature feature of vela.

Adding tests for this to make sure that they work as expected as we make more and changes

The changes in the PR, create a cloned branch or creates a branch from a backup and makes sure that its active healthy.

next

In the PR the plan is to add tests to make sure that data is persisted from source clone to target clone.

@boddumanohar boddumanohar changed the base branch from main to dev March 22, 2026 18:25
@boddumanohar boddumanohar force-pushed the tests-add-clone-restore-tests branch from 6a63086 to 8a58211 Compare March 22, 2026 18:27
@boddumanohar boddumanohar force-pushed the tests-add-clone-restore-tests branch from 8a58211 to 91a8fe0 Compare March 23, 2026 14:59
@boddumanohar boddumanohar force-pushed the tests-add-clone-restore-tests branch from 4cbfffe to 4493bf7 Compare March 24, 2026 05:04
@boddumanohar boddumanohar force-pushed the tests-add-clone-restore-tests branch from 4493bf7 to 5315d40 Compare March 24, 2026 05:24
@boddumanohar boddumanohar force-pushed the tests-add-clone-restore-tests branch from 5315d40 to 27713a3 Compare March 24, 2026 05:45
@boddumanohar boddumanohar requested a review from Copilot March 24, 2026 05:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new integration coverage for two key Vela capabilities—branch cloning and restoring a branch from a backup—by creating branches through the public API and waiting until they reach ACTIVE_HEALTHY.

Changes:

  • Added tests/test_backup_and_clone.py to exercise branch clone and restore-from-backup flows.
  • Reduced the default BRANCH_TIMEOUT_SEC used by wait_for_status.
  • Registered the new test file in pytest testpaths.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
tests/test_backup_and_clone.py New integration tests for cloning a branch and restoring a branch from a manual backup.
tests/conftest.py Changes the default branch status polling timeout used across integration tests.
pyproject.toml Adds the new test module to pytest’s configured testpaths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/conftest.py Outdated
Comment thread tests/test_backup_and_clone.py Outdated
Comment thread tests/test_backup_and_clone.py Outdated
Comment thread tests/test_backup_and_clone.py Outdated
Comment thread tests/test_backup_and_clone.py Outdated
Comment thread tests/test_backup_and_clone.py Outdated
Comment thread tests/test_backup_and_clone.py Outdated
@boddumanohar boddumanohar force-pushed the tests-add-clone-restore-tests branch from 27713a3 to d9dccad Compare March 24, 2026 05:59
@boddumanohar boddumanohar marked this pull request as ready for review March 24, 2026 07:44
@boddumanohar boddumanohar force-pushed the tests-add-clone-restore-tests branch from d9dccad to 8372bde Compare March 24, 2026 07:53
@boddumanohar boddumanohar force-pushed the tests-add-clone-restore-tests branch from 8372bde to 9c78bbd Compare March 24, 2026 08:48
Copy link
Copy Markdown
Collaborator

@mxsrc mxsrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this, but I feel we need to establish a clearer structure. With this change test_branches.py does not do what says anymore. Can we create a hierarchy? Like tests/branches/test_{basic,clone_restore}.py. Also, it'd be great to have a fixture for branch creation akin to the organization/project fixtures.

@boddumanohar
Copy link
Copy Markdown
Member Author

restructured the tests to tests/branches/test_{basic,clone_restore}.py

@boddumanohar boddumanohar requested a review from mxsrc March 24, 2026 12:37
@mxsrc
Copy link
Copy Markdown
Collaborator

mxsrc commented Mar 24, 2026

I see the tests are still running, so I converted this PR to a draft. Can you reopen it and give me a ping when it's ready for review? From a quick glance things look fine overall :)

@mxsrc mxsrc marked this pull request as draft March 24, 2026 14:06
@boddumanohar boddumanohar marked this pull request as ready for review March 24, 2026 14:18
Copy link
Copy Markdown
Collaborator

@mxsrc mxsrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks largely good, can we remove the comment sections though? I'm really not a fan of those, they tend to be forgotten and at least for me don't add much value. If they help you we can also keep them.

Copy link
Copy Markdown
Collaborator

@mxsrc mxsrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@boddumanohar boddumanohar merged commit c51d0f5 into dev Mar 24, 2026
8 checks passed
@boddumanohar boddumanohar deleted the tests-add-clone-restore-tests branch March 24, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants