Skip to content

Commit e2183a9

Browse files
committed
Ensure test only runs if EC is defined
1 parent d70ad84 commit e2183a9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/functional/adapter/dremio_specific/test_twin_strategy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
)
1111

1212
DREMIO_EDITION = os.getenv("DREMIO_EDITION")
13+
DREMIO_ENTERPRISE_CATALOG = os.getenv("DREMIO_ENTERPRISE_CATALOG")
1314

1415
schema_prevent_yml = """
1516
version: 2
@@ -267,7 +268,7 @@ def dbt_profile_data(
267268
target = dbt_profile_target
268269
# For enterprise catalog: object_storage_source == dremio_space AND object_storage_path == dremio_space_folder
269270
# This maps to: target.datalake == target.database AND target.root_path == target.schema
270-
enterprise_catalog_name = os.getenv("DREMIO_ENTERPRISE_CATALOG")
271+
enterprise_catalog_name = DREMIO_ENTERPRISE_CATALOG
271272
target["schema"] = unique_schema
272273
target["root_path"] = unique_schema # Make object_storage_path == dremio_space_folder
273274
target["datalake"] = enterprise_catalog_name # Set object_storage_source to enterprise catalog
@@ -278,7 +279,7 @@ def dbt_profile_data(
278279
profile.update(profiles_config_update)
279280
return profile
280281

281-
@pytest.mark.skipif(DREMIO_EDITION == "community", reason="Enterprise catalog is only supported in Dremio EE/DC editions.")
282+
@pytest.mark.skipif(DREMIO_EDITION == "community" or not os.getenv("DREMIO_ENTERPRISE_CATALOG"), reason="Enterprise catalog is only supported in Dremio EE/DC editions.")
282283
def test_twin_strategy_not_applied_with_enterprise_catalog(self, project, caplog):
283284
# Run with twin_strategy configured but enterprise catalog enabled
284285
# Should show warning and not apply twin strategy

0 commit comments

Comments
 (0)