Skip to content

Commit

Permalink
fix: use the docker test setup as default!
Browse files Browse the repository at this point in the history
  • Loading branch information
dlbrittain committed Feb 19, 2025
1 parent fbb3b2d commit ed19d13
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ def setup_docker_image(docker_mode, mat_metadata):

db_environment = [
"POSTGRES_USER=postgres",
"POSTGRES_PASSWORD=materialize",
"POSTGRES_DB=materialize",
"POSTGRES_PASSWORD=postgres",
f"POSTGRES_DB={aligned_volume}",
]

try:
Expand Down Expand Up @@ -187,6 +187,7 @@ def check_database(sql_uri: str) -> bool: # Changed return type hint
except Exception as e:
test_logger.info(e)
return False # Explicitly return False on failure



def setup_database(aligned_volume_name, database_uri):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data/mat_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"version": 1,
"timestamp": "2021-03-25 18:46:55.690121",
"expires_timestamp": "2021-04-01 18:48:09.540908",
"sql_uri": "postgresql://postgres:materialize@localhost:5432/materialize",
"sql_uri": "postgresql://postgres:postgres@localhost:5432/test_aligned_volume",
"schema": "synapse",
"chunk_size": 2,
"analysis_version": 1,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def test_get_sql_url_params(self, database_uri):
url_mapping = get_sql_url_params(database_uri)

assert url_mapping["user"] == "postgres"
assert url_mapping["password"] == "materialize"
assert url_mapping["dbname"] == "materialize"
assert url_mapping["password"] == "postgres"
assert url_mapping["dbname"] == "test_aligned_volume"
assert url_mapping["host"] == "localhost"
assert url_mapping["port"] == 5432

Expand Down

0 comments on commit ed19d13

Please sign in to comment.