Skip to content

Commit 69206c7

Browse files
authored
Chore include dev only vde in engine integration test (#5396)
1 parent 226dab9 commit 69206c7

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

sqlmesh/core/snapshot/evaluator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,8 +1440,9 @@ def _can_clone(self, snapshot: Snapshot, deployability_index: DeployabilityIndex
14401440
and adapter.SUPPORTS_CLONING
14411441
# managed models cannot have their schema mutated because theyre based on queries, so clone + alter wont work
14421442
and not snapshot.is_managed
1443-
# If the deployable table is missing we can't clone it
14441443
and not deployability_index.is_deployable(snapshot)
1444+
# If the deployable table is missing we can't clone it
1445+
and adapter.table_exists(snapshot.table_name())
14451446
)
14461447

14471448
def _get_data_objects(

tests/core/engine_adapter/integration/test_integration.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
from sqlmesh import Config, Context
2424
from sqlmesh.cli.project_init import init_example_project
25+
from sqlmesh.core.config.common import VirtualEnvironmentMode
2526
from sqlmesh.core.config.connection import ConnectionConfig
2627
import sqlmesh.core.dialect as d
2728
from sqlmesh.core.environment import EnvironmentSuffixTarget
@@ -1938,7 +1939,12 @@ def test_transaction(ctx: TestContext):
19381939
ctx.compare_with_current(table, input_data)
19391940

19401941

1941-
def test_sushi(ctx: TestContext, tmp_path: pathlib.Path):
1942+
@pytest.mark.parametrize(
1943+
"virtual_environment_mode", [VirtualEnvironmentMode.FULL, VirtualEnvironmentMode.DEV_ONLY]
1944+
)
1945+
def test_sushi(
1946+
ctx: TestContext, tmp_path: pathlib.Path, virtual_environment_mode: VirtualEnvironmentMode
1947+
):
19421948
if ctx.mark == "athena_hive":
19431949
pytest.skip(
19441950
"Sushi end-to-end tests only need to run once for Athena because sushi needs a hybrid of both Hive and Iceberg"
@@ -1984,6 +1990,7 @@ def _mutate_config(gateway: str, config: Config) -> None:
19841990
).sql(dialect=config.model_defaults.dialect)
19851991
for e in before_all
19861992
]
1993+
config.virtual_environment_mode = virtual_environment_mode
19871994

19881995
context = ctx.create_context(_mutate_config, path=tmp_path, ephemeral_state_connection=False)
19891996

0 commit comments

Comments
 (0)