Skip to content

Commit

Permalink
update test charm
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaAltieri committed Feb 19, 2024
1 parent 5a752ee commit 0f34275
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/integration/application/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, *args):
# relation events for mongos client
self.database = DatabaseRequires(
self,
relation_name="mongos_proxy",
relation_name="mongos",
database_name="my-test-db",
extra_user_roles=EXTRA_USER_ROLES,
)
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async def check_mongos(
ops_test: OpsTest,
unit: ops.model.Unit,
auth: bool,
app_name: Optional[str],
app_name: Optional[str] = None,
uri: str = None,
external: bool = False,
) -> bool:
Expand Down Expand Up @@ -71,10 +71,10 @@ async def generate_mongos_uri(
host = (
MONGOS_SOCKET
if not external
else await get_ip_address(ops_test, app_name=MONGOS_APP_NAME)
else f"{await get_ip_address(ops_test, app_name=MONGOS_APP_NAME)}:27018"
)
if not auth:
return f"mongodb://{host}:27018"
return f"mongodb://{host}"

secret_uri = await get_application_relation_data(
ops_test, app_name, "mongos", "secret-user"
Expand Down

0 comments on commit 0f34275

Please sign in to comment.