Skip to content

Commit 18f62ea

Browse files
deploy self-signed-certificates with juju command
1 parent 154e358 commit 18f62ea

File tree

4 files changed

+29
-16
lines changed

4 files changed

+29
-16
lines changed

tests/integration/test_data_integrator.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,14 @@ async def test_external_connectivity_with_data_integrator(
5858
num_units=None,
5959
series=series,
6060
),
61-
ops_test.model.deploy(
62-
tls_app_name, application_name=tls_app_name, channel=tls_channel, config=tls_config
61+
# s390x not available on latest edge release so libjuju fails to deploy it
62+
ops_test.juju(
63+
"deploy",
64+
tls_app_name,
65+
"--channel",
66+
tls_channel,
67+
"--config",
68+
"ca-common-name='Test CA'",
6369
),
6470
ops_test.model.deploy(
6571
DATA_INTEGRATOR_APP_NAME,

tests/integration/test_exporter_with_tls.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,14 @@ async def test_exporter_endpoint(ops_test: OpsTest, charm, series) -> None:
133133
)
134134

135135
logger.info(f"Deploying {tls_app_name}")
136-
await ops_test.model.deploy(
136+
# s390x not available on latest edge release so libjuju fails to deploy it
137+
await ops_test.juju(
138+
"deploy",
137139
tls_app_name,
138-
application_name=tls_app_name,
139-
channel=tls_channel,
140-
config=tls_config,
141-
series="jammy",
140+
"--channel",
141+
tls_channel,
142+
"--config",
143+
"ca-common-name='Test CA'",
142144
)
143145
await ops_test.model.wait_for_idle([tls_app_name], status="active", timeout=SLOW_TIMEOUT)
144146

tests/integration/test_hacluster.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,14 @@ async def test_tls_along_with_ha_cluster(ops_test: OpsTest, series) -> None:
262262
"""Ensure that mysqlrouter is externally accessible with TLS integration."""
263263
logger.info("Deploying TLS")
264264
async with ops_test.fast_forward("60s"):
265-
await ops_test.model.deploy(
265+
# s390x not available on latest edge release so libjuju fails to deploy it
266+
await ops_test.juju(
267+
"deploy",
266268
tls_app_name,
267-
application_name=tls_app_name,
268-
channel=tls_channel,
269-
config=tls_config,
269+
"--channel",
270+
tls_channel,
271+
"--config",
272+
"ca-common-name='Test CA'",
270273
)
271274

272275
logger.info("Ensure auto-generated TLS cert before relation with TLS")

tests/integration/test_tls.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ async def test_build_deploy_and_relate(ops_test: OpsTest, charm, series) -> None
5656
num_units=None,
5757
series=series,
5858
),
59-
ops_test.model.deploy(
59+
# s390x not available on latest edge release so libjuju fails to deploy it
60+
ops_test.juju(
61+
"deploy",
6062
tls_app_name,
61-
application_name=tls_app_name,
62-
channel=tls_channel,
63-
config=tls_config,
64-
series="jammy",
63+
"--channel",
64+
tls_channel,
65+
"--config",
66+
"ca-common-name='Test CA'",
6567
),
6668
ops_test.model.deploy(
6769
TEST_APP_NAME,

0 commit comments

Comments
 (0)