Skip to content

Fix: normalize unit testing fixture catalog#5343

Merged
georgesittas merged 1 commit intomainfrom
jo/normalize_fixture_catalog_in_unit_tests
Sep 11, 2025
Merged

Fix: normalize unit testing fixture catalog#5343
georgesittas merged 1 commit intomainfrom
jo/normalize_fixture_catalog_in_unit_tests

Conversation

@georgesittas
Copy link
Contributor

@georgesittas georgesittas commented Sep 10, 2025

I came across this issue in a project that used a Snowflake test connection, so it's kinda "out of the blue" / no further context to provide.

In unit tests, we create fixture tables of the form <engine_adapter_catalog>.<randomly_generated_testing_schema>.<fqn>. The PR normalizes the leftmost part, because we omitted doing it and then quoted it in _render_model_query (see how table_mapping is used in the renderer), so for Snowflake we could end up with errors like Database '"george"' does not exist or the required permissions are missing.

I added a simple unit test for Snowflake to ensure there are no regressions in the future.

@georgesittas georgesittas requested a review from a team September 10, 2025 18:31
@georgesittas georgesittas merged commit dc302eb into main Sep 11, 2025
36 checks passed
@georgesittas georgesittas deleted the jo/normalize_fixture_catalog_in_unit_tests branch September 11, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants