Skip to content

Commit

Permalink
[components] [easy] Use ephemeral instance in test (#26230)
Browse files Browse the repository at this point in the history
## Summary & Motivation

Changing this test to run against ephemeral instance. It was running against the default system before which leaves file system turds if you do not have DAGSTER_HOME set

## How I Tested These Changes

Local test run. Saw no file system turds.
  • Loading branch information
schrockn authored Dec 2, 2024
1 parent b78c17d commit 1b0c7fb
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from dagster._components.impls.pipes_subprocess_script_collection import (
PipesSubprocessScriptCollection,
)
from dagster._core.instance import DagsterInstance

LOCATION_PATH = Path(__file__).parent / "code_locations" / "python_script_location"

Expand All @@ -37,7 +38,9 @@ def _asset_keys(component: Component) -> set[AssetKey]:
def _assert_assets(component: Component, expected_assets: int) -> None:
defs = component.build_defs(ComponentLoadContext.for_test())
assert len(defs.get_asset_graph().get_all_asset_keys()) == expected_assets
result = defs.get_implicit_global_asset_job_def().execute_in_process()
result = defs.get_implicit_global_asset_job_def().execute_in_process(
instance=DagsterInstance.ephemeral()
)
assert result.success


Expand Down

0 comments on commit 1b0c7fb

Please sign in to comment.