Skip to content

feat: add convenience function that copies tests from one project to … #462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2025

Conversation

gustavocidornelas
Copy link
Contributor

…another

Summary

  • Adds a convenience function that allows users to copy tests from one project to another.
  • The user can optionally specify a list of test ids to be copied over. If a list of test ids is not provided, all tests from the origin project will get copied over.
  • Example of usage:
from openlayer import Openlayer
from openlayer.lib.core import tests

client = Openlayer()

# Copy all tests
tests.copy_tests(
    client=client,
    origin_project_id="50e303f8-26c5-4551-a034-c0a95fbe58ec",  # Where the tests are
    target_project_id="09c9757b-35fc-49af-bb78-e01c5a14cabc",   # Where the tests will be copied over to
    verbose=True
)

# Copy only some tests
tests.copy_tests(
    client=client,
    origin_project_id="50e303f8-26c5-4551-a034-c0a95fbe58ec",
    target_project_id="09c9757b-35fc-49af-bb78-e01c5a14cabc",
    test_ids=["test_id_1", "test_id_2", "test_id_3"]
    verbose=True
)

@gustavocidornelas gustavocidornelas merged commit ecf15e1 into main Apr 25, 2025
2 checks passed
@gustavocidornelas gustavocidornelas deleted the cid/copy-tests branch April 25, 2025 18:00
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.

2 participants