fix(tests): remove duplicate "rejection output should contain" step to fix AmbiguousStep
CI / push-validation (pull_request) Successful in 25s
CI / lint (pull_request) Successful in 35s
CI / helm (pull_request) Successful in 36s
CI / build (pull_request) Successful in 39s
CI / quality (pull_request) Successful in 54s
CI / typecheck (pull_request) Successful in 1m10s
CI / security (pull_request) Successful in 1m8s
CI / unit_tests (pull_request) Successful in 5m34s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Failing after 11m33s
CI / integration_tests (pull_request) Successful in 28m3s
CI / status-check (pull_request) Failing after 4s

The new step file defined a Then step that collided with the pre-existing
definition in validation_attach_type_guard_steps.py:220, causing behave to
abort step-module loading with AmbiguousStep across every worker and
failing the unit_tests gate with 32 errored features.

Remove the duplicate from the new file and bridge context.last_result =
context.named_opts_result after each invoke so the pre-existing,
context.last_result-based step covers the new feature file's scenarios.

Closes #3684
This commit is contained in:
2026-05-30 15:54:07 -04:00
parent 5589a4c9e8
commit 86eda6edfc
@@ -80,6 +80,7 @@ def step_named_opts_invoke_with_args(
validation_app,
cmd,
)
context.last_result = context.named_opts_result
@when('I invoke validation attach "{resource}" "{validation}" with no extra args')
@@ -92,6 +93,7 @@ def step_named_opts_invoke_no_args(
validation_app,
cmd,
)
context.last_result = context.named_opts_result
# ---------------------------------------------------------------------------
@@ -163,10 +165,3 @@ def step_named_opts_attach_rejected(context: Context) -> None:
f"Expected non-zero exit code (rejection), got {result.exit_code}. "
f"Output: {result.output}"
)
@then('the rejection output should contain "{text}"')
def step_named_opts_rejection_contains(context: Context, text: str) -> None:
"""Verify the rejection output contains the expected text."""
output = context.named_opts_result.output
assert text in output, f"Expected {text!r} in rejection output, got: {output!r}"