Files
cleveragents-core/robot/tdd_automation_profile_di_bypass.robot
HAL9000 6a76ea894d
CI / push-validation (pull_request) Successful in 27s
CI / helm (pull_request) Successful in 30s
CI / lint (pull_request) Successful in 39s
CI / build (pull_request) Successful in 52s
CI / quality (pull_request) Successful in 58s
CI / typecheck (pull_request) Successful in 1m19s
CI / security (pull_request) Successful in 1m20s
CI / integration_tests (pull_request) Successful in 3m43s
CI / unit_tests (pull_request) Successful in 4m33s
CI / docker (pull_request) Successful in 1m26s
CI / coverage (pull_request) Successful in 12m0s
CI / status-check (pull_request) Successful in 3s
test(cli): add TDD regression tests for automation_profile._get_service() DI bypass
Three BDD scenarios and two Robot Framework integration tests verifying that
_get_service() in automation_profile.py resolves AutomationProfileService
through the DI container rather than manually calling create_engine or
sessionmaker (bug #990).

Bug #990 was fixed by PR #1181 before this TDD test PR merged; the
@tdd_expected_fail tag is therefore absent and these tests serve as
permanent regression guards confirming the fix remains in place.

ISSUES CLOSED: #1031
2026-05-29 15:26:47 -04:00

32 lines
1.7 KiB
Plaintext

*** Settings ***
Documentation TDD Bug #990 — automation_profile._get_service() bypasses DI container
... Integration smoke tests verifying that _get_service() in
... automation_profile.py resolves AutomationProfileService through the
... DI container rather than calling create_engine or sessionmaker directly.
... Bug #990 was fixed by PR #1181; these tests serve as regression guards.
Resource ${CURDIR}/common.resource
Suite Setup Setup Test Environment
Suite Teardown Cleanup Test Environment
*** Variables ***
${HELPER} ${CURDIR}/helper_tdd_automation_profile_di_bypass.py
*** Test Cases ***
TDD Automation Profile DI Container Resolution
[Documentation] Verify _get_service() returns the service from the DI container
[Tags] tdd_bug tdd_bug_990 tdd_issue tdd_issue_990
${result}= Run Process ${PYTHON} ${HELPER} container-resolution cwd=${WORKSPACE} timeout=120s on_timeout=kill
Log ${result.stdout}
Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} tdd-ap990-container-resolution-ok
TDD Automation Profile DI Bypass Check
[Documentation] Verify _get_service() does not call create_engine or sessionmaker directly
[Tags] tdd_bug tdd_bug_990 tdd_issue tdd_issue_990
${result}= Run Process ${PYTHON} ${HELPER} di-bypass cwd=${WORKSPACE} timeout=120s on_timeout=kill
Log ${result.stdout}
Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} tdd-ap990-di-bypass-ok