Skip to content

Commit 2434501

Browse files
committed
fix: legacy default expectation behavior
1 parent 4191d10 commit 2434501

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

airbyte_cdk/test/entrypoint_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def _run_command(
172172
`expected_outcome` arg. The old argument is supported (for now) for backwards compatibility.
173173
"""
174174
expected_outcome = expected_outcome or ExpectedOutcome.from_expecting_exception_bool(
175-
expecting_exception
175+
expecting_exception,
176176
)
177177
log_capture_buffer = StringIO()
178178
stream_handler = logging.StreamHandler(log_capture_buffer)

airbyte_cdk/test/models/outcome.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def from_status_str(cls, status: str | None) -> ExpectedOutcome:
4040
def from_expecting_exception_bool(cls, expecting_exception: bool | None) -> ExpectedOutcome:
4141
"""Convert a boolean indicating whether an exception is expected to an ExpectedOutcome."""
4242
if expecting_exception is None:
43-
return ExpectedOutcome.ALLOW_ANY
43+
# Align with legacy behavior where default would be 'False' (no exception expected)
44+
return ExpectedOutcome.EXPECT_SUCCESS
4445

4546
return (
4647
ExpectedOutcome.EXPECT_EXCEPTION

0 commit comments

Comments
 (0)