Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions tests/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,3 @@ def juju_has_secrets(mocker: MockerFixture):
JujuVersion, "has_secrets", new_callable=PropertyMock
).return_value = True
return True


@pytest.fixture
def only_with_juju_secrets(juju_has_secrets):
"""Pretty way to skip Juju 3 tests."""
if not juju_has_secrets:
pytest.skip("Secrets test only applies on Juju 3.x")


@pytest.fixture
def only_without_juju_secrets(juju_has_secrets):
"""Pretty way to skip Juju 2-specific tests.
Typically: to save CI time, when the same check were executed in a Juju 3-specific way already
"""
if juju_has_secrets:
pytest.skip("Skipping legacy secrets tests")
Copy link
Author

Choose a reason for hiding this comment

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

We had already the whole test suite running with and without secrets (unit-juju2 and unit-juju3 respectively), the only change needed was to adapt the few tests that only ran in one or the other, and remove this fixtures.

Copy link
Author

Choose a reason for hiding this comment

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

merging those 2 suites into one will be addressed in a follow-up PR!

1,356 changes: 688 additions & 668 deletions tests/unit/test_backups.py

Large diffs are not rendered by default.

1,575 changes: 783 additions & 792 deletions tests/unit/test_charm.py

Large diffs are not rendered by default.

Loading