Skip to content

Commit 510163c

Browse files
committed
fix: Update test expectations for AUDIT_ONLY models
- Update model counts in analytics and integration tests - Account for 3 new AUDIT_ONLY models in sushi example - Fix snapshot count assertions
1 parent 20c32f3 commit 510163c

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/core/analytics/test_collector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def test_on_plan_apply(
183183
{
184184
"seq_num": 0,
185185
"event_type": "PLAN_APPLY_START",
186-
"event": f'{{"plan_id": "{plan_id}", "engine_type": "bigquery", "state_sync_type": "mysql", "scheduler_type": "builtin", "is_dev": false, "skip_backfill": false, "no_gaps": false, "forward_only": false, "ensure_finalized_snapshots": false, "has_restatements": false, "directly_modified_count": 21, "indirectly_modified_count": 0, "environment_name_hash": "d6e4a9b6646c62fc48baa6dd6150d1f7"}}',
186+
"event": f'{{"plan_id": "{plan_id}", "engine_type": "bigquery", "state_sync_type": "mysql", "scheduler_type": "builtin", "is_dev": false, "skip_backfill": false, "no_gaps": false, "forward_only": false, "ensure_finalized_snapshots": false, "has_restatements": false, "directly_modified_count": 24, "indirectly_modified_count": 0, "environment_name_hash": "d6e4a9b6646c62fc48baa6dd6150d1f7"}}',
187187
**common_fields,
188188
}
189189
),

tests/core/state_sync/test_state_sync.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2287,8 +2287,8 @@ def test_migrate_rows(state_sync: EngineAdapterStateSync, mocker: MockerFixture)
22872287
new_snapshots = state_sync.engine_adapter.fetchdf("select * from sqlmesh._snapshots")
22882288
new_environments = state_sync.engine_adapter.fetchdf("select * from sqlmesh._environments")
22892289

2290-
assert len(old_snapshots) == 24
2291-
assert len(new_snapshots) == 36
2290+
assert len(old_snapshots) == 27 # 24 + 3 AUDIT_ONLY models
2291+
assert len(new_snapshots) == 39 # 36 + 3 AUDIT_ONLY models
22922292
assert len(old_environments) == len(new_environments)
22932293

22942294
start = "2023-01-01"

tests/core/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def test_forward_only_plan_with_effective_date(context_fixture: Context, request
112112

113113
plan_builder = context.plan_builder("dev", skip_tests=True, forward_only=True)
114114
plan = plan_builder.build()
115-
assert len(plan.new_snapshots) == 2
115+
assert len(plan.new_snapshots) == 3 # waiter_revenue_by_day, top_waiters, and audit_waiter_revenue_anomalies
116116
assert (
117117
plan.context_diff.snapshots[snapshot.snapshot_id].change_category
118118
== SnapshotChangeCategory.NON_BREAKING

0 commit comments

Comments
 (0)