File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright 2024 Canonical Ltd.
2
+ # See LICENSE file for licensing details.
3
+
4
+ import pytest
5
+
6
+ from . import juju_
7
+
8
+ only_with_juju_secrets = pytest .mark .skipif (
9
+ not juju_ .has_secrets , reason = "Requires juju version w/secrets"
10
+ )
Original file line number Diff line number Diff line change 9
9
import pytest
10
10
from pytest_operator .plugin import OpsTest
11
11
12
- from . import juju_
13
12
from .helpers import execute_queries_against_unit , get_tls_certificate_issuer
13
+ from . import juju_
14
+ from . import markers
14
15
15
16
logger = logging .getLogger (__name__ )
16
17
@@ -41,6 +42,7 @@ async def get_data_integrator_credentials(ops_test: OpsTest) -> typing.Dict:
41
42
42
43
@pytest .mark .group (1 )
43
44
@pytest .mark .abort_on_fail
45
+ @markers .only_with_juju_secrets
44
46
async def test_external_connectivity_with_data_integrator (
45
47
ops_test : OpsTest , mysql_router_charm_series : str
46
48
) -> None :
@@ -103,6 +105,7 @@ async def test_external_connectivity_with_data_integrator(
103
105
104
106
@pytest .mark .group (1 )
105
107
@pytest .mark .abort_on_fail
108
+ @markers .only_with_juju_secrets
106
109
async def test_external_connectivity_with_data_integrator_and_tls (ops_test : OpsTest ) -> None :
107
110
"""Test data integrator along with TLS operator"""
108
111
logger .info ("Ensuring no data exists in the test database" )
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ async def test_exporter_endpoint_with_tls(ops_test: OpsTest) -> None:
178
178
179
179
await ops_test .model .wait_for_idle ([TLS_APP_NAME ], status = "active" , timeout = SLOW_TIMEOUT )
180
180
181
- logger .info (f"Relation mysqlrouter with { TLS_APP_NAME } " )
181
+ logger .info (f"Relating mysqlrouter with { TLS_APP_NAME } " )
182
182
183
183
await ops_test .model .relate (
184
184
f"{ MYSQL_ROUTER_APP_NAME } :certificates" , f"{ TLS_APP_NAME } :certificates"
You can’t perform that action at this time.
0 commit comments