Skip to content

Commit

Permalink
Add schema name replacement function for SQL snapshots.
Browse files Browse the repository at this point in the history
This makes snapshot comparisons consistent between runs as the schema name will
change.
  • Loading branch information
plypaul committed Nov 13, 2024
1 parent 1d62c11 commit b8b76a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests_metricflow/sql/compare_sql_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def assert_default_rendered_sql_equal(
plan=sql_query_plan,
plan_snapshot_text=rendered_sql,
plan_snapshot_file_extension=".sql",
incomparable_strings_replacement_function=make_schema_replacement_function(
system_schema=mf_test_configuration.mf_system_schema, source_schema=mf_test_configuration.mf_source_schema
),
)


Expand Down

0 comments on commit b8b76a3

Please sign in to comment.