Skip to content

Commit badc7f9

Browse files
committed
Upgrade tests WIP
1 parent e53aa35 commit badc7f9

File tree

18 files changed

+1425
-1011
lines changed

18 files changed

+1425
-1011
lines changed

poetry.lock

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ psycopg2-binary = "^2.9.10"
7272
boto3 = "*"
7373
tenacity = "^9.1.2"
7474
allure-pytest = "^2.15.0"
75-
jubilant = "^1.4.0"
75+
jubilant = "^1.5.0"
7676
tomli-w = "^1.2.0"
7777
tomli = "^2.3.0"
7878

@@ -101,6 +101,7 @@ minversion = "6.0"
101101
log_cli_level = "INFO"
102102
asyncio_mode = "auto"
103103
markers = ["juju3", "juju_secrets"]
104+
addopts = "--exitfirst"
104105

105106
# Linting tools configuration
106107
[tool.ruff]

tests/integration/conftest.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -104,28 +104,15 @@ def juju(request: pytest.FixtureRequest):
104104
105105
This adds command line parameter ``--keep-models`` (see help for details).
106106
"""
107-
controller = request.config.getoption("--controller")
108107
model = request.config.getoption("--model")
109-
controller_and_model = None
110-
if controller and model:
111-
controller_and_model = f"{controller}:{model}"
112-
elif controller:
113-
controller_and_model = controller
114-
elif model:
115-
controller_and_model = model
116108
keep_models = bool(request.config.getoption("--keep-models"))
117109

118-
if controller_and_model:
119-
juju = jubilant.Juju(model=controller_and_model) # type: ignore
110+
if model:
111+
juju = jubilant.Juju(model=model)
120112
yield juju
121-
log = juju.debug_log(limit=1000)
122113
else:
123114
with jubilant.temp_model(keep=keep_models) as juju:
124115
yield juju
125-
log = juju.debug_log(limit=1000)
126-
127-
if request.session.testsfailed:
128-
print(log, end="")
129116

130117

131118
@pytest.fixture(scope="module")

0 commit comments

Comments
 (0)