Skip to content
Draft
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
9 changes: 0 additions & 9 deletions .github/workflows/integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,6 @@ jobs:
runs-on: ${{ matrix.job.runner }}
timeout-minutes: 226 # Sum of steps `timeout-minutes` + 5
steps:
- name: Free up disk space
timeout-minutes: 10
run: |
printf '\nDisk usage before cleanup\n'
df --human-readable
# Based on https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
rm -r /opt/hostedtoolcache/
printf '\nDisk usage after cleanup\n'
df --human-readable
- name: Checkout
timeout-minutes: 3
uses: actions/checkout@v5
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ minversion = "6.0"
log_cli_level = "INFO"
asyncio_mode = "auto"
markers = ["juju3", "juju_secrets"]
addopts = "--exitfirst"

# Formatting tools configuration
[tool.black]
Expand Down
3 changes: 3 additions & 0 deletions spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ backends:
sudo passwd -d runner

ADDRESS localhost

sudo mkdir -p /var/snap/lxd/common/lxd/storage-pools
sudo mount --bind /mnt /var/snap/lxd/common/lxd/storage-pools
# HACK: spread does not pass environment variables set on runner
# Manually pass specific environment variables
environment:
Expand Down
17 changes: 2 additions & 15 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,28 +105,15 @@ def juju(request: pytest.FixtureRequest):

This adds command line parameter ``--keep-models`` (see help for details).
"""
controller = request.config.getoption("--controller")
model = request.config.getoption("--model")
controller_and_model = None
if controller and model:
controller_and_model = f"{controller}:{model}"
elif controller:
controller_and_model = controller
elif model:
controller_and_model = model
keep_models = bool(request.config.getoption("--keep-models"))

if controller_and_model:
juju = jubilant.Juju(model=controller_and_model) # type: ignore
if model:
juju = jubilant.Juju(model=model)
yield juju
log = juju.debug_log(limit=1000)
else:
with jubilant.temp_model(keep=keep_models) as juju:
yield juju
log = juju.debug_log(limit=1000)

if request.session.testsfailed:
print(log, end="")


@pytest.fixture(scope="module")
Expand Down
Loading
Loading