Skip to content

Commit 95f94af

Browse files
committed
test: name the expected operation in the removed-integration history case
1 parent 305c256 commit 95f94af

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎tests/unit/src/sqlbuild/runtime/observability/_test_types.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ class RetiredOperationCase:
133133
description: str
134134
operation_kind: str
135135
operation_name: str
136+
expected_operation_name: str
136137

137138

138139
@dataclass(frozen=True)

‎tests/unit/src/sqlbuild/runtime/observability/test_serialization.py‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,15 @@ def test_given_known_event_when_serializing_and_decoding_then_round_trips(
153153
@pytest.mark.parametrize(
154154
"test_case",
155155
[
156-
RetiredOperationCase("a stored dlt or callable load", "loader", "external_source_load"),
157-
RetiredOperationCase("a stored ingestr subprocess", "subprocess", "ingestr_command"),
156+
RetiredOperationCase(
157+
"a stored dlt or callable load",
158+
"loader",
159+
"external_source_load",
160+
"external_source_load",
161+
),
162+
RetiredOperationCase(
163+
"a stored ingestr subprocess", "subprocess", "ingestr_command", "ingestr_command"
164+
),
158165
],
159166
ids=lambda case: case.description,
160167
)
@@ -181,7 +188,7 @@ def test_given_operation_from_a_removed_integration_when_decoding_history_then_i
181188
decoded: LifecycleEvent | OpaqueLifecycleEvent = lifecycle_event_from_json(stored)
182189

183190
assert isinstance(decoded, LifecycleEvent)
184-
assert decoded.payload["operation_name"] == test_case.operation_name
191+
assert decoded.payload["operation_name"] == test_case.expected_operation_name
185192

186193

187194
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)