Skip to content

Commit 8acbc9d

Browse files
author
Lucas Gameiro
authored
[DPE-4068] Convert all tests from unittest to pytest + enable/disable secrets in every test (#452)
* convert all tests to pytest * remove secret remove hook * Revert "remove secret remove hook"
1 parent de297a4 commit 8acbc9d

File tree

10 files changed

+2686
-2593
lines changed

10 files changed

+2686
-2593
lines changed

tests/unit/conftest.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,3 @@ def juju_has_secrets(mocker: MockerFixture):
3030
JujuVersion, "has_secrets", new_callable=PropertyMock
3131
).return_value = True
3232
return True
33-
34-
35-
@pytest.fixture
36-
def only_with_juju_secrets(juju_has_secrets):
37-
"""Pretty way to skip Juju 3 tests."""
38-
if not juju_has_secrets:
39-
pytest.skip("Secrets test only applies on Juju 3.x")
40-
41-
42-
@pytest.fixture
43-
def only_without_juju_secrets(juju_has_secrets):
44-
"""Pretty way to skip Juju 2-specific tests.
45-
46-
Typically: to save CI time, when the same check were executed in a Juju 3-specific way already
47-
"""
48-
if juju_has_secrets:
49-
pytest.skip("Skipping legacy secrets tests")

tests/unit/test_backups.py

Lines changed: 688 additions & 668 deletions
Large diffs are not rendered by default.

tests/unit/test_charm.py

Lines changed: 783 additions & 792 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)