Skip to content

Commit

Permalink
[DPE-2691] Switch to self-signed-certificates operator (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
deusebio authored Feb 8, 2024
1 parent f3c2841 commit 2b2bfaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tests/integration/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
)
Expand Down
9 changes: 5 additions & 4 deletions tests/integration/test_tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit 2b2bfaa

Please sign in to comment.