Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/system/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ def _hash_digest_file(hasher, filepath):

@pytest.fixture(scope="session")
def normalize_connection_id():
"""Normalizes the connection ID by casefolding only the LOCATION component.
"""Normalizes the connection ID by casefolding the PROJECT and LOCATION components.

Connection format: PROJECT.LOCATION.CONNECTION_NAME
Only LOCATION is case-insensitive; PROJECT and CONNECTION_NAME must be lowercase.
PROJECT and LOCATION are case-insensitive; CONNECTION_NAME must be lowercase.
"""

def normalize(connection_id: str) -> str:
parts = connection_id.split(".")
if len(parts) == 3:
return f"{parts[0]}.{parts[1].casefold()}.{parts[2]}"
return f"{parts[0].casefold()}.{parts[1].casefold()}.{parts[2]}"
return connection_id # Return unchanged if invalid format

return normalize
Expand Down