Skip to content

Commit

Permalink
tests: pin deployed charms to a latest and stable version (#176)
Browse files Browse the repository at this point in the history
This commit pins all charms that get deployed from Charmhub to a latest/edge or suggested versions.

Part of canonical/bundle-kubeflow#863
  • Loading branch information
DnPlas authored Apr 16, 2024
1 parent f0d288d commit 7e1f8fb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
10 changes: 7 additions & 3 deletions tests/integration/test_charms.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
UI_APP_NAME = UI_METADATA["name"]
DB_APP_NAME = DB_METADATA["name"]

KUBEFLOW_PROFILES = "kubeflow-profiles"
KUBEFLOW_PROFILES_CHANNEL = "latest/edge"
KUBEFLOW_PROFILES_TRUST = True

logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -65,9 +69,9 @@ async def test_deploy_katib_charms(ops_test: OpsTest):

# Deploy charms responsible for CRDs creation
await ops_test.model.deploy(
entity_url="kubeflow-profiles",
channel="latest/edge",
trust=True,
entity_url=KUBEFLOW_PROFILES,
channel=KUBEFLOW_PROFILES_CHANNEL,
trust=KUBEFLOW_PROFILES_TRUST,
)

# Wait for everything to deploy
Expand Down
12 changes: 7 additions & 5 deletions tests/integration/test_katib_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
kind="Profile",
plural="profiles",
)
TRAINING_CHARM = "training-operator"
TRAINING_OPERATOR = "training-operator"
TRAINING_OPERATOR_CHANNEL = "latest/edge"
TRAINING_OPERATOR_TRUST = True


@pytest.fixture(scope="module")
Expand All @@ -42,12 +44,12 @@ def lightkube_client() -> lightkube.Client:
async def training_operator(ops_test: OpsTest):
"""Deploy training-operator charm, and wait until it's active."""
await ops_test.model.deploy(
entity_url=TRAINING_CHARM,
channel="latest/edge",
trust=True,
entity_url=TRAINING_OPERATOR,
channel=TRAINING_OPERATOR_CHANNEL,
trust=TRAINING_OPERATOR_TRUST,
)
await ops_test.model.wait_for_idle(
apps=[TRAINING_CHARM], status="active", raise_on_blocked=False, timeout=60 * 5
apps=[TRAINING_OPERATOR], status="active", raise_on_blocked=False, timeout=60 * 5
)


Expand Down

0 comments on commit 7e1f8fb

Please sign in to comment.