Skip to content

Commit

Permalink
Deploy charms without jammy support with base ubuntu@20.04
Browse files Browse the repository at this point in the history
  • Loading branch information
shayancanonical committed Sep 24, 2024
1 parent e42332d commit 47dfc6b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion tests/integration/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ async def deploy_and_relate_application_with_postgresql(
channel: str = "stable",
relation: str = "db",
status: str = "blocked",
base: str = CHARM_BASE,
) -> int:
"""Helper function to deploy and relate application with PostgreSQL.
Expand All @@ -283,6 +284,7 @@ async def deploy_and_relate_application_with_postgresql(
relation: Name of the PostgreSQL relation to relate
the application to.
status: The status to wait for in the application (default: blocked).
base: The base of the charm to deploy
Returns:
the id of the created relation.
Expand All @@ -293,7 +295,7 @@ async def deploy_and_relate_application_with_postgresql(
channel=channel,
application_name=application_name,
num_units=number_of_units,
base=CHARM_BASE,
base=base,
)
await ops_test.model.wait_for_idle(
apps=[application_name],
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/new_relations/test_new_relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,10 +682,10 @@ async def test_indico_datatabase(ops_test: OpsTest) -> None:
base=CHARM_BASE,
)
await ops_test.model.deploy(
"redis-k8s", channel="stable", application_name="redis-broker", base=CHARM_BASE
"redis-k8s", channel="stable", application_name="redis-broker", base="ubuntu@20.04"
)
await ops_test.model.deploy(
"redis-k8s", channel="stable", application_name="redis-cache", base=CHARM_BASE
"redis-k8s", channel="stable", application_name="redis-cache", base="ubuntu@20.04"
)
await asyncio.gather(
ops_test.model.relate("redis-broker", "indico:redis-broker"),
Expand Down
7 changes: 6 additions & 1 deletion tests/integration/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ async def test_finos_waltz_db(ops_test: OpsTest) -> None:

# Deploy and test the first deployment of Finos Waltz.
relation_id = await deploy_and_relate_application_with_postgresql(
ops_test, "finos-waltz-k8s", FINOS_WALTZ_APP_NAME, APPLICATION_UNITS, channel="edge"
ops_test,
"finos-waltz-k8s",
FINOS_WALTZ_APP_NAME,
APPLICATION_UNITS,
channel="edge",
base="ubuntu@20.04",
)
await check_database_creation(ops_test, "waltz")

Expand Down

0 comments on commit 47dfc6b

Please sign in to comment.