diff --git a/tests/integration/test_charm.py b/tests/integration/test_charm.py index a89ab1e..56b6158 100644 --- a/tests/integration/test_charm.py +++ b/tests/integration/test_charm.py @@ -220,9 +220,9 @@ async def test_user_secret_permissions(juju: jubilant.Juju) -> None: ) logger.info("Secret access will be granted now - wait for updated password") + juju.grant_secret(identifier=secret_name, app=APP_NAME) # deferred `config_changed` event will be retried before `update_status` with fast_forward(juju): - juju.grant_secret(identifier=secret_name, app=APP_NAME) juju.wait( lambda status: are_apps_active_and_agents_idle(status, APP_NAME, idle_period=10), timeout=1200, diff --git a/tests/integration/tls/test_certificate_rotation.py b/tests/integration/tls/test_certificate_rotation.py index cb7d7fa..2313463 100644 --- a/tests/integration/tls/test_certificate_rotation.py +++ b/tests/integration/tls/test_certificate_rotation.py @@ -218,7 +218,7 @@ async def test_ca_rotation_by_expiration(juju: jubilant.Juju) -> None: juju.remove_relation(f"{APP_NAME}:client-certificates", f"{TLS_NAME}:certificates") juju.wait( lambda status: are_agents_idle(status, APP_NAME, idle_period=30, unit_count=NUM_UNITS), - timeout=100, + timeout=600, ) logger.info("Adjust CA and certificate validity on TLS provider") @@ -274,6 +274,10 @@ async def test_ca_rotation_by_expiration(juju: jubilant.Juju) -> None: logger.info("Waiting for CA certificate to expire") sleep(CA_EXPIRY_TIME) + juju.wait( + lambda status: are_agents_idle(status, APP_NAME, idle_period=10, unit_count=NUM_UNITS), + timeout=600, + ) logger.info("Check access with previous certificate fails after expiration") with pytest.raises(Exception) as exc_info: