Files
cleveragents-core/robot/tdd_plan_explain_plan_id.robot
T
HAL9000 4d04b2e4ad
CI / lint (pull_request) Successful in 48s
CI / quality (pull_request) Successful in 47s
CI / typecheck (pull_request) Successful in 1m8s
CI / build (pull_request) Successful in 30s
CI / push-validation (pull_request) Successful in 19s
CI / security (pull_request) Successful in 1m22s
CI / helm (pull_request) Successful in 28s
CI / unit_tests (pull_request) Successful in 5m58s
CI / docker (pull_request) Successful in 1m38s
CI / coverage (pull_request) Successful in 13m36s
CI / integration_tests (pull_request) Successful in 22m10s
CI / status-check (pull_request) Successful in 3s
test(tdd): restore tdd_plan_explain_plan_id regression tests for fixed behaviour
The TDD regression files for bug #968 were incorrectly deleted instead of
updated to assert the spec-compliant fixed behaviour from issue #6325.
Per CONTRIBUTING.md the regression guard must be kept and updated — not
removed — once the bug is fixed.

Restore and update all three files to assert the new expected behaviour:
- plan explain rejects a non-decision-id argument with rc=1
- error output contains "not found"
- decision data fields are absent from output

Also pair the orphaned robot/helper_tdd_plan_explain_plan_id.py with a
restored robot test file and update it to verify rc=1 rejection behaviour.

ISSUES CLOSED: #6325
2026-05-31 15:00:33 -04:00

33 lines
1.7 KiB
Plaintext

*** Settings ***
Documentation Bug #968 / Issue #6325 — plan explain must reject plan_id, accept only decision_id
... Integration tests verifying that ``plan explain <plan_id>`` is correctly
... rejected with rc=1. The old list_decisions fallback has been removed.
Resource ${CURDIR}/common.resource
Suite Setup Setup Test Environment With Database Isolation
Suite Teardown Cleanup Test Environment
*** Variables ***
${HELPER} ${CURDIR}/helper_tdd_plan_explain_plan_id.py
*** Test Cases ***
TDD Plan Explain Rejects Plan ID With RC 1
[Documentation] Verify that ``plan explain <plan_id>`` exits with rc=1
... when given a plan ID (not a decision ID).
... Issue #6325: the fallback to list_decisions has been removed.
[Tags] tdd_issue tdd_issue_968 tdd_issue_4178
${result}= Run Process ${PYTHON} ${HELPER} explain-with-plan-id cwd=${WORKSPACE} timeout=180s on_timeout=kill
Log ${result.stdout}
Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} tdd-plan-explain-plan-id-rejected
TDD Plan Explain With Plan ID Shows Error Message
[Documentation] Verify that the output when given a plan_id contains
... "not found" per the spec-compliant error message.
[Tags] tdd_issue tdd_issue_968 tdd_issue_4178
${result}= Run Process ${PYTHON} ${HELPER} explain-plan-id-shows-error cwd=${WORKSPACE} timeout=180s on_timeout=kill
Log ${result.stdout}
Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} tdd-plan-explain-plan-id-error-ok