Skip to content

Commit

Permalink
add a test case that fails if you forget to filter asset check execut…
Browse files Browse the repository at this point in the history
…ions by asset key (#24216)

Test Plan: BK

## Summary & Motivation

## How I Tested These Changes

## Changelog [New | Bug | Docs]

> Replace this message with a changelog entry, or `NOCHANGELOG`
  • Loading branch information
gibsondan authored Sep 4, 2024
1 parent 61c64eb commit 5fd25f0
Showing 1 changed file with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5193,22 +5193,23 @@ def test_asset_checks(
check_key_1 = AssetCheckKey(AssetKey(["my_asset"]), "my_check")
check_key_2 = AssetCheckKey(AssetKey(["my_asset"]), "my_check_2")

storage.store_event(
EventLogEntry(
error_info=None,
user_message="",
level="debug",
run_id=run_id_1,
timestamp=time.time(),
dagster_event=DagsterEvent(
DagsterEventType.ASSET_CHECK_EVALUATION_PLANNED.value,
"nonce",
event_specific_data=AssetCheckEvaluationPlanned(
asset_key=AssetKey(["my_asset"]), check_name="my_check"
for asset_key in {AssetKey(["my_asset"]), AssetKey(["my_other_asset"])}:
storage.store_event(
EventLogEntry(
error_info=None,
user_message="",
level="debug",
run_id=run_id_1,
timestamp=time.time(),
dagster_event=DagsterEvent(
DagsterEventType.ASSET_CHECK_EVALUATION_PLANNED.value,
"nonce",
event_specific_data=AssetCheckEvaluationPlanned(
asset_key=asset_key, check_name="my_check"
),
),
),
)
)
)

checks = storage.get_asset_check_execution_history(check_key_1, limit=10)
assert len(checks) == 1
Expand Down

0 comments on commit 5fd25f0

Please sign in to comment.