Skip to content
Open
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
603 changes: 603 additions & 0 deletions tests/integration/adapters.py

Large diffs are not rendered by default.

224 changes: 109 additions & 115 deletions tests/integration/backup_helpers.py

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import uuid

import boto3
import jubilant
import pytest
from pytest_operator.plugin import OpsTest

from . import architecture
from .adapters import JujuFixture, temp_model_fixture
from .helpers import construct_endpoint
from .jubilant_helpers import RoleAttributeValue

Expand Down Expand Up @@ -74,7 +74,7 @@ def cleanup_cloud(config: dict[str, str], credentials: dict[str, str]) -> None:


@pytest.fixture(scope="module")
async def aws_cloud_configs(ops_test: OpsTest) -> None:
def aws_cloud_configs(ops_test: OpsTest):
if (
not os.environ.get("AWS_ACCESS_KEY", "").strip()
or not os.environ.get("AWS_SECRET_KEY", "").strip()
Expand All @@ -89,7 +89,7 @@ async def aws_cloud_configs(ops_test: OpsTest) -> None:


@pytest.fixture(scope="module")
async def gcp_cloud_configs(ops_test: OpsTest) -> None:
def gcp_cloud_configs(ops_test: OpsTest):
if (
not os.environ.get("GCP_ACCESS_KEY", "").strip()
or not os.environ.get("GCP_SECRET_KEY", "").strip()
Expand All @@ -113,10 +113,10 @@ def juju(request: pytest.FixtureRequest):
keep_models = bool(request.config.getoption("--keep-models"))

if model:
juju = jubilant.Juju(model=model)
juju = JujuFixture(model=model)
yield juju
else:
with jubilant.temp_model(keep=keep_models) as juju:
with temp_model_fixture(keep=keep_models) as juju:
yield juju


Expand Down
Loading
Loading