Files
cleveragents-core/robot/provider_detection_smoke.robot
freemo b122ec7ed5
CI / lint (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 51s
CI / typecheck (pull_request) Successful in 1m0s
CI / security (pull_request) Successful in 55s
CI / build (pull_request) Successful in 25s
CI / helm (pull_request) Successful in 32s
CI / push-validation (pull_request) Successful in 26s
CI / e2e_tests (pull_request) Successful in 3m38s
CI / integration_tests (pull_request) Successful in 6m42s
CI / unit_tests (pull_request) Successful in 8m19s
CI / docker (pull_request) Successful in 13s
CI / coverage (pull_request) Successful in 15m23s
CI / status-check (pull_request) Successful in 2s
fix(test-infra): remove redundant ${PYTHON} variable definitions from robot files
Remove the local ${PYTHON}    python (and python3) variable definitions from
the *** Variables *** sections of all affected robot files. These local
definitions were overriding the pabot-injected venv Python path passed via
--variable PYTHON:/path/to/venv/python, causing tests to use the system
Python (which lacks required packages like structlog, sqlalchemy, etc.)
instead of the nox venv Python.

The correct ${PYTHON} value is already set by Setup Test Environment in
common.resource via sys.executable, and pabot passes it via --variable.
The local fallback definitions are redundant and harmful in parallel runs.

Audit found 56 robot files with the pattern (more than the 9 originally
identified in the issue). All occurrences have been removed.

ISSUES CLOSED: #1309
2026-04-14 14:50:55 +00:00

41 lines
1.6 KiB
Plaintext

*** Settings ***
Resource ${CURDIR}/common.resource
Library OperatingSystem
Library Process
Suite Setup Setup Test Environment
*** Variables ***
${SRC_DIR} ${CURDIR}/..
*** Test Cases ***
Verify Provider Detection With Mock
[Documentation] When mock_providers is enabled the container returns a mock provider
${result}= Run Process ${PYTHON} robot/helper_provider_detection.py mock-detection
... cwd=${SRC_DIR}
... env:CLEVERAGENTS_MOCK_PROVIDERS=true
... env:CLEVERAGENTS_TESTING_USE_MOCK_AI=
Log Process Failure ${result}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} mock-provider-ok
Verify Provider Detection Without Config Fails
[Documentation] With no API keys and mock_providers off validate_provider_availability raises
${result}= Run Process ${PYTHON} robot/helper_provider_detection.py no-config-fail
... cwd=${SRC_DIR}
... env:CLEVERAGENTS_MOCK_PROVIDERS=
... env:OPENAI_API_KEY=
... env:ANTHROPIC_API_KEY=
... env:GOOGLE_API_KEY=
... env:CLEVERAGENTS_TESTING_USE_MOCK_AI=
Log Process Failure ${result}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} no-config-error-ok
*** Keywords ***
Log Process Failure
[Arguments] ${result}
Run Keyword If ${result.rc} == 0 Return From Keyword
Log To Console Process failed with rc=${result.rc}
Log To Console STDOUT:${\n}${result.stdout}
Log To Console STDERR:${\n}${result.stderr}