Skip to content

Commit 3dc4b23

Browse files
committed
Fix test
1 parent de3ad7f commit 3dc4b23

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/core/engine_adapter/integration/test_integration_postgres.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,10 @@ def _mutate_config(gateway: str, config: Config):
195195
sqlmesh = ctx.create_context(
196196
path=tmp_path, config_mutator=_mutate_config, ephemeral_state_connection=False
197197
)
198-
sqlmesh.plan(environment="dev", auto_apply=True)
198+
# need run=True to prevent a "start date is greater than end date" error
199+
# since dev cant exceed what is in prod, and prod has no cadence runs,
200+
# without run=True this plan gets start=2020-01-04 (now) end=2020-01-01 (last prod interval) which fails
201+
sqlmesh.plan(environment="dev", auto_apply=True, run=True)
199202

200203
# should now have 7 snapshots in state - 2x model a, 3x model b, 1x model c and 1x model d
201204
all_snapshot_ids = _all_snapshot_ids(sqlmesh)

0 commit comments

Comments
 (0)