Skip to content

Commit

Permalink
Explicitly use base instead of series, and hardcode base as ubuntu@22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
shayancanonical committed Aug 21, 2024
1 parent 5766fd3 commit bf981d2
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 15 deletions.
1 change: 0 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ async def deploy_and_scale_mysql(
config=config,
resources=resources,
num_units=num_units,
series="jammy",
base="ubuntu@22.04",
trust=True,
)

Expand Down Expand Up @@ -197,6 +197,7 @@ async def deploy_and_scale_application(ops_test: OpsTest) -> str:
application_name=APPLICATION_DEFAULT_APP_NAME,
num_units=1,
channel="latest/edge",
base="ubuntu@22.04",
)

await ops_test.model.wait_for_idle(
Expand Down
6 changes: 4 additions & 2 deletions tests/integration/high_availability/test_async_replication.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ async def test_build_and_deploy(
config=config,
resources=resources,
trust=True,
base="ubuntu@22.04",
)
config["cluster-name"] = "cuzco"
await second_model.deploy(
Expand All @@ -99,6 +100,7 @@ async def test_build_and_deploy(
config=config,
resources=resources,
trust=True,
base="ubuntu@22.04",
)

logger.info("Waiting for the applications to settle")
Expand Down Expand Up @@ -193,15 +195,15 @@ async def test_deploy_router_and_app(first_model: Model) -> None:
await first_model.deploy(
MYSQL_ROUTER_APP_NAME,
application_name=MYSQL_ROUTER_APP_NAME,
series="jammy",
base="ubuntu@22.04",
channel="8.0/edge",
num_units=1,
trust=True,
)
await first_model.deploy(
APPLICATION_APP_NAME,
application_name=APPLICATION_APP_NAME,
series="jammy",
base="ubuntu@22.04",
channel="latest/edge",
num_units=1,
)
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/high_availability/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ async def test_deploy_latest(ops_test: OpsTest) -> None:
channel="8.0/edge",
trust=True,
config={"profile": "testing"},
base="ubuntu@22.04",
)
await ops_test.model.deploy(
TEST_APP_NAME,
application_name=TEST_APP_NAME,
num_units=1,
channel="latest/edge",
base="ubuntu@22.04",
)

await relate_mysql_and_application(ops_test, MYSQL_APP_NAME, TEST_APP_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ async def test_deploy_stable(ops_test: OpsTest) -> None:
channel="8.0/stable",
trust=True,
config={"profile": "testing"},
base="ubuntu@22.04",
),
ops_test.model.deploy(
f"mysql-{TEST_APP_NAME}",
application_name=TEST_APP_NAME,
num_units=1,
channel="latest/edge",
base="ubuntu@22.04",
),
)
await relate_mysql_and_application(ops_test, MYSQL_APP_NAME, TEST_APP_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
num_units=3,
resources=resources,
trust=True,
base="ubuntu@22.04",
)

await ops_test.model.wait_for_idle(
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/relations/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ async def test_build_and_deploy(ops_test: OpsTest):
config=config,
num_units=3,
resources=resources,
series="jammy",
base="ubuntu@22.04",
trust=True,
),
ops_test.model.deploy(
APPLICATION_APP_NAME,
application_name=APPLICATION_APP_NAME,
num_units=2,
channel="latest/edge",
base="ubuntu@22.04",
),
)

Expand Down
16 changes: 12 additions & 4 deletions tests/integration/relations/test_mysql_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def test_deploy_and_relate_osm_bundle(ops_test: OpsTest) -> None:
resources=resources,
config=config,
num_units=1,
series="jammy",
base="ubuntu@22.04",
trust=True,
),
# Deploy the osm-keystone charm
Expand All @@ -70,20 +70,28 @@ async def test_deploy_and_relate_osm_bundle(ops_test: OpsTest) -> None:
channel="latest/beta",
resources=osm_pol_resources,
trust=True,
base="ubuntu@22.04",
),
ops_test.model.deploy(
"kafka-k8s", application_name="kafka", trust=True, channel="latest/stable"
"kafka-k8s",
application_name="kafka",
trust=True,
channel="latest/stable",
base="ubuntu@22.04",
),
ops_test.model.deploy(
"zookeeper-k8s", application_name="zookeeper", channel="latest/stable"
"zookeeper-k8s",
application_name="zookeeper",
channel="latest/stable",
base="ubuntu@22.04",
),
# sticking to revision that support both juju 2.9.x and 3.x
ops_test.model.deploy(
"mongodb-k8s",
application_name="mongodb",
channel="5/edge",
revision=36,
series="jammy",
base="ubuntu@22.04",
),
)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_backup_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:

logger.info("Deploying s3-integrator")

await ops_test.model.deploy(S3_INTEGRATOR, channel="stable")
await ops_test.model.deploy(S3_INTEGRATOR, channel="stable", base="ubuntu@22.04")
await ops_test.model.relate(mysql_application_name, S3_INTEGRATOR)

await ops_test.model.wait_for_idle(
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_backup_ceph.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:

logger.info("Deploying s3-integrator")

await ops_test.model.deploy(S3_INTEGRATOR, channel="stable")
await ops_test.model.deploy(S3_INTEGRATOR, channel="stable", base="ubuntu@22.04")
await ops_test.model.relate(mysql_application_name, S3_INTEGRATOR)

await ops_test.model.wait_for_idle(
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_backup_gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:

logger.info("Deploying s3-integrator")

await ops_test.model.deploy(S3_INTEGRATOR, channel="stable")
await ops_test.model.deploy(S3_INTEGRATOR, channel="stable", base="ubuntu@22.04")
await ops_test.model.relate(mysql_application_name, S3_INTEGRATOR)

await ops_test.model.wait_for_idle(
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
application_name=APP_NAME,
config=config,
num_units=3,
series="jammy",
base="ubuntu@22.04",
trust=True,
)

Expand Down
6 changes: 4 additions & 2 deletions tests/integration/test_tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
resources=resources,
application_name=APP_NAME,
num_units=3,
series="jammy",
base="ubuntu@22.04",
trust=True,
config=config,
)
Expand Down Expand Up @@ -128,7 +128,9 @@ async def test_enable_tls(ops_test: OpsTest) -> None:
# Deploy TLS Certificates operator.
logger.info("Deploy TLS operator")
async with ops_test.fast_forward("60s"):
await ops_test.model.deploy(tls_app_name, channel=tls_channel, config=tls_config)
await ops_test.model.deploy(
tls_app_name, channel=tls_channel, config=tls_config, base="ubuntu@22.04"
)
await ops_test.model.wait_for_idle(apps=[tls_app_name], status="active", timeout=15 * 60)

# Relate with TLS charm
Expand Down

0 comments on commit bf981d2

Please sign in to comment.