From 2b2bfaa17ff19e4d154ebebdfcb2b74aa2402e14 Mon Sep 17 00:00:00 2001 From: deusebio Date: Thu, 8 Feb 2024 10:51:54 -0800 Subject: [PATCH] [DPE-2691] Switch to self-signed-certificates operator (#162) --- tests/integration/test_provider.py | 6 +++--- tests/integration/test_tls.py | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/integration/test_provider.py b/tests/integration/test_provider.py index 88390695..31624e90 100644 --- a/tests/integration/test_provider.py +++ b/tests/integration/test_provider.py @@ -22,7 +22,7 @@ ZK = "zookeeper" DUMMY_NAME_1 = "app" DUMMY_NAME_2 = "appii" -TLS_NAME = "tls-certificates-operator" +TLS_NAME = "self-signed-certificates" REL_NAME_CONSUMER = "kafka-client-consumer" REL_NAME_PRODUCER = "kafka-client-producer" @@ -229,8 +229,8 @@ async def test_connection_updated_on_tls_enabled(ops_test: OpsTest, app_charm): await ops_test.model.wait_for_idle(apps=[APP_NAME, DUMMY_NAME_1]) # deploying tls - tls_config = {"generate-self-signed-certificates": "true", "ca-common-name": "kafka"} - await ops_test.model.deploy(TLS_NAME, channel="stable", config=tls_config, series="jammy") + tls_config = {"ca-common-name": "kafka"} + await ops_test.model.deploy(TLS_NAME, channel="edge", config=tls_config, series="jammy") await ops_test.model.wait_for_idle( apps=[TLS_NAME], idle_period=30, timeout=1800, status="active" ) diff --git a/tests/integration/test_tls.py b/tests/integration/test_tls.py index 8e7f1402..f796ff4e 100644 --- a/tests/integration/test_tls.py +++ b/tests/integration/test_tls.py @@ -35,17 +35,18 @@ logger = logging.getLogger(__name__) -TLS_NAME = "tls-certificates-operator" +TLS_NAME = "self-signed-certificates" +CERTS_NAME = "tls-certificates-operator" MTLS_NAME = "mtls" @pytest.mark.abort_on_fail @pytest.mark.skip_if_deployed async def test_deploy_tls(ops_test: OpsTest, kafka_charm): - tls_config = {"generate-self-signed-certificates": "true", "ca-common-name": "kafka"} + tls_config = {"ca-common-name": "kafka"} await asyncio.gather( - ops_test.model.deploy(TLS_NAME, channel="stable", config=tls_config, series="jammy"), + ops_test.model.deploy(TLS_NAME, channel="edge", config=tls_config, series="jammy"), ops_test.model.deploy(ZK, channel="edge", series="jammy", application_name=ZK), ops_test.model.deploy( kafka_charm, @@ -168,7 +169,7 @@ async def test_mtls(ops_test: OpsTest): "ca-certificate": encoded_client_ca, } await ops_test.model.deploy( - TLS_NAME, channel="stable", config=tls_config, series="jammy", application_name=MTLS_NAME + CERTS_NAME, channel="stable", config=tls_config, series="jammy", application_name=MTLS_NAME ) await ops_test.model.wait_for_idle(apps=[MTLS_NAME], timeout=1000, idle_period=15) async with ops_test.fast_forward():