Skip to content

Commit

Permalink
Explicitly use base instead of series, and hardcode base as [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
shayancanonical committed Aug 19, 2024
1 parent 45ac8e0 commit 3ca35c4
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 18 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 @@ -142,7 +142,7 @@ async def deploy_and_scale_mysql(
application_name=mysql_application_name,
config=config,
num_units=num_units,
series="jammy",
base="[email protected]",
)

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 @@ -79,13 +79,15 @@ async def test_build_and_deploy(
application_name=MYSQL_APP1,
num_units=3,
config=config,
base="[email protected]",
)
config["cluster-name"] = "cuzco"
await second_model.deploy(
charm,
application_name=MYSQL_APP2,
num_units=3,
config=config,
base="[email protected]",
)

logger.info("Waiting for the applications to settle")
Expand Down Expand Up @@ -175,15 +177,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="[email protected]",
channel="dpe/edge",
num_units=1,
trust=True,
)
await first_model.deploy(
APPLICATION_APP_NAME,
application_name=APPLICATION_APP_NAME,
series="jammy",
base="[email protected]",
channel="latest/edge",
num_units=1,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/high_availability/test_replication.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ async def test_cluster_isolation(ops_test: OpsTest, highly_available_cluster) ->
charm,
application_name=ANOTHER_APP_NAME,
num_units=1,
series="jammy",
base="[email protected]",
)
async with ops_test.fast_forward("60s"):
await ops_test.model.block_until(
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/high_availability/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ async def test_deploy_latest(ops_test: OpsTest) -> None:
num_units=3,
channel="8.0/edge",
config={"profile": "testing"},
series="jammy",
base="[email protected]",
),
ops_test.model.deploy(
TEST_APP_NAME,
application_name=TEST_APP_NAME,
num_units=1,
channel="latest/edge",
base="[email protected]",
),
)
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 @@ -33,14 +33,15 @@ async def test_deploy_stable(ops_test: OpsTest) -> None:
application_name=MYSQL_APP_NAME,
num_units=3,
channel="8.0/stable",
series="jammy",
base="[email protected]",
config={"profile": "testing"},
),
ops_test.model.deploy(
TEST_APP_NAME,
application_name=TEST_APP_NAME,
num_units=1,
channel="latest/edge",
base="[email protected]",
),
)
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 @@ -53,7 +53,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
charm,
application_name=MYSQL_APP_NAME,
num_units=3,
series="jammy",
base="[email protected]",
config={"profile": "testing", "plugin-audit-enabled": "false"},
)

Expand All @@ -62,6 +62,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
application_name=TEST_APP,
channel="latest/edge",
num_units=1,
base="[email protected]",
)

await relate_mysql_and_application(ops_test, MYSQL_APP_NAME, TEST_APP)
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 @@ -57,13 +57,14 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
application_name=DATABASE_APP_NAME,
config=config,
num_units=3,
series="jammy",
base="[email protected]",
),
ops_test.model.deploy(
APPLICATION_APP_NAME,
application_name=APPLICATION_APP_NAME,
num_units=2,
channel="latest/edge",
base="[email protected]",
),
)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/relations/test_db_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ async def test_keystone_bundle_db_router(ops_test: OpsTest) -> None:
config = {"cluster-name": CLUSTER_NAME, "profile": "testing"}

mysql_app = await ops_test.model.deploy(
charm, application_name=APP_NAME, config=config, num_units=1, series="jammy"
charm, application_name=APP_NAME, config=config, num_units=1, base="[email protected]"
)

# Deploy keystone
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/relations/test_relation_mysql_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,14 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
application_name=DATABASE_APP_NAME,
config=config,
num_units=3,
series="jammy",
base="[email protected]",
),
ops_test.model.deploy(
APPLICATION_APP_NAME,
application_name=APPLICATION_APP_NAME,
num_units=1,
channel="latest/edge",
base="[email protected]",
),
)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/relations/test_shared_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async def test_keystone_bundle_shared_db(ops_test: OpsTest) -> None:
application_name=APP_NAME,
config=config,
num_units=3,
series="jammy",
base="[email protected]",
)

# Reduce the update_status frequency for the duration of the test
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 @@ -101,7 +101,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:

logger.info("Deploying s3 integrator")

await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL)
await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL, base="[email protected]")
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 @@ -101,7 +101,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:

logger.info("Deploying s3 integrator")

await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL)
await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL, base="[email protected]")
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 @@ -101,7 +101,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:

logger.info("Deploying s3 integrator")

await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL)
await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL, base="[email protected]")
await ops_test.model.relate(mysql_application_name, S3_INTEGRATOR)

await ops_test.model.wait_for_idle(
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_subordinate_charms.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ async def test_ubuntu_pro(ops_test, github_secrets):
db_charm,
application_name=DATABASE_APP_NAME,
config={"cluster-name": CLUSTER_NAME, "profile": "testing"},
series="jammy",
base="[email protected]",
),
ops_test.model.deploy(
APPLICATION_APP_NAME,
application_name=APPLICATION_APP_NAME,
channel="latest/edge",
base="[email protected]",
),
ops_test.model.deploy(
UBUNTU_PRO_APP_NAME,
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 @@ -62,7 +62,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
charm,
application_name=APP_NAME,
num_units=3,
series="jammy",
base="[email protected]",
)

# Reduce the update_status frequency until the cluster is deployed
Expand Down Expand Up @@ -117,7 +117,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="[email protected]"
)
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 3ca35c4

Please sign in to comment.