Skip to content

Commit

Permalink
Merge develop into maintenance/DX-1/DX-440/alexsherstinsky/link/updat…
Browse files Browse the repository at this point in the history
…e_not_imported_mechanism_to_use_scoped_compatibility_modules_instead-2023_06_28-50
  • Loading branch information
github-actions[bot] committed Jun 28, 2023
2 parents 07c1204 + 3653d41 commit f99b5e5
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 29 deletions.
9 changes: 5 additions & 4 deletions tests/conftest.py
Expand Up @@ -3600,10 +3600,11 @@ def set_side_effect(key, value):
"great_expectations.data_context.store.datasource_store.DatasourceStore.set",
side_effect=set_side_effect,
):
context.add_datasource(
"my_datasource",
**config,
)
with pytest.deprecated_call(): # non-FDS datasources discouraged in Cloud
context.add_datasource(
"my_datasource",
**config,
)
return context


Expand Down
56 changes: 31 additions & 25 deletions tests/data_context/cloud_data_context/test_datasource_crud.py
Expand Up @@ -211,22 +211,25 @@ def test_data_context_in_cloud_mode_add_datasource(
expected_datasource_config = datasourceConfigSchema.dump(
block_config_datasource_config
)
stored_datasource = context.add_datasource(
name=datasource_name,
**expected_datasource_config,
)
with pytest.deprecated_call(): # non-FDS datasources discouraged in Cloud
stored_datasource = context.add_datasource(
name=datasource_name,
**expected_datasource_config,
)
elif config_includes_name_setting == "config_includes_name":
stored_datasource = context.add_datasource(
**datasource_config_with_name.to_dict()
)
with pytest.deprecated_call(): # non-FDS datasources discouraged in Cloud
stored_datasource = context.add_datasource(
**datasource_config_with_name.to_dict()
)
elif (
config_includes_name_setting
== "name_supplied_separately_and_included_in_config"
):
stored_datasource = context.add_datasource(
name=datasource_name,
**datasource_config_with_name.to_dict(),
)
with pytest.deprecated_call(): # non-FDS datasources discouraged in Cloud
stored_datasource = context.add_datasource(
name=datasource_name,
**datasource_config_with_name.to_dict(),
)
else:
raise ValueError(
"Invalid value provided for 'config_includes_name_setting'"
Expand Down Expand Up @@ -323,25 +326,28 @@ def test_cloud_data_context_add_datasource(
expected_datasource_config = datasourceConfigSchema.dump(
block_config_datasource_config
)
stored_datasource = context.add_datasource(
name=datasource_name,
**expected_datasource_config,
save_changes=True,
)
with pytest.deprecated_call(): # non-FDS datasources discouraged in Cloud
stored_datasource = context.add_datasource(
name=datasource_name,
**expected_datasource_config,
save_changes=True,
)
elif config_includes_name_setting == "config_includes_name":
stored_datasource = context.add_datasource(
**datasource_config_with_name.to_dict(),
save_changes=True,
)
with pytest.deprecated_call(): # non-FDS datasources discouraged in Cloud
stored_datasource = context.add_datasource(
**datasource_config_with_name.to_dict(),
save_changes=True,
)
elif (
config_includes_name_setting
== "name_supplied_separately_and_included_in_config"
):
stored_datasource = context.add_datasource(
name=datasource_name,
**datasource_config_with_name.to_dict(),
save_changes=True,
)
with pytest.deprecated_call(): # non-FDS datasources discouraged in Cloud
stored_datasource = context.add_datasource(
name=datasource_name,
**datasource_config_with_name.to_dict(),
save_changes=True,
)
else:
raise ValueError(
"Invalid value provided for 'config_includes_name_setting'"
Expand Down

0 comments on commit f99b5e5

Please sign in to comment.