51a6e76e9e
CI / lint (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 28s
CI / security (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 14s
CI / integration_tests (pull_request) Failing after 6m34s
CI / unit_tests (pull_request) Successful in 6m46s
CI / build (pull_request) Successful in 15s
CI / docker (pull_request) Successful in 8s
CI / coverage (pull_request) Successful in 5m8s
Three fixes targeting CI integration_tests failures (18 failures on e8aa5ac):
1. Merge duplicate *** Settings *** blocks in 14 robot files into single
blocks. Multiple Settings sections are non-standard RF practice and
may cause resource import failures in certain Robot Framework versions
or CI environments.
2. Replace bare 'python' with ${PYTHON} variable in all Run Process
calls (14 files). Noxfile now passes --variable PYTHON:<venv-path>
to robot so tests use the venv interpreter regardless of PATH. This
fixes '/usr/local/bin/python: No module named cleveragents' on CI.
3. Add comprehensive CI debug output in noxfile.py: file existence
checks for .resource files, PATH/Python resolution, fixture dir
checks, and RF version. This will diagnose any remaining resource
import issues.
Also: remove hardcoded '/app/src' sys.path.insert in
system_prompt_template_rendering.robot (not portable to CI), and
add trailing newline to common.resource.
All 204 tests pass locally (4 excluded: 2 slow, 2 discovery).
101 lines
3.6 KiB
Plaintext
101 lines
3.6 KiB
Plaintext
*** Settings ***
|
|
Documentation Simple context management test for CleverAgents CLI
|
|
Library Process
|
|
Library OperatingSystem
|
|
Library String
|
|
Library DateTime
|
|
Resource ${CURDIR}/v2_paths.resource
|
|
Suite Setup Setup Test Environment
|
|
Suite Teardown Cleanup Test Environment
|
|
|
|
*** Variables ***
|
|
${PYTHON} python
|
|
${SIMPLE_CONFIG} ${V2_CONFIG_DIR}/simple_echo_config.yaml
|
|
${CONTEXT_DIR} ${TEMPDIR}/test_contexts
|
|
${UNIQUE_ID} ${EMPTY}
|
|
${TEMP} ${EMPTY}
|
|
|
|
*** Test Cases ***
|
|
Test Context Command Help
|
|
[Documentation] Verify context command help is available
|
|
${result} = Run Process ${PYTHON} -m cleveragents context --help
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} Context management
|
|
Should Contain ${result.stdout} clear
|
|
Should Contain ${result.stdout} Context management
|
|
|
|
Test Run With Context Creates Directory
|
|
[Documentation] Verify --context flag creates context directory
|
|
${context_name} = Set Variable ctx_${UNIQUE_ID}
|
|
|
|
# Use simple test config that exits cleanly
|
|
${result} = Run Process ${PYTHON} -m cleveragents actor run
|
|
... -c ${SIMPLE_CONFIG}
|
|
... --context ${context_name}
|
|
... --context-dir ${CONTEXT_DIR}
|
|
... --unsafe
|
|
... --allow-rxpy-in-run-mode
|
|
... -p "test message"
|
|
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Directory Should Exist ${CONTEXT_DIR}/${context_name}
|
|
|
|
Test Context Delete
|
|
[Documentation] Test context delete command
|
|
${context_name} = Set Variable del_${UNIQUE_ID}
|
|
|
|
# Create context
|
|
Run Process ${PYTHON} -m cleveragents actor run
|
|
... -c ${SIMPLE_CONFIG}
|
|
... --context ${context_name}
|
|
... --context-dir ${CONTEXT_DIR}
|
|
... --unsafe
|
|
... --allow-rxpy-in-run-mode
|
|
... -p "test"
|
|
|
|
Directory Should Exist ${CONTEXT_DIR}/${context_name}
|
|
|
|
# Delete it
|
|
${result} = Run Process ${PYTHON} -m cleveragents context delete
|
|
... ${context_name}
|
|
... --context-dir ${CONTEXT_DIR}
|
|
... --yes
|
|
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Directory Should Not Exist ${CONTEXT_DIR}/${context_name}
|
|
|
|
Test Context Clear
|
|
[Documentation] Test context clear command
|
|
${context_name} = Set Variable clear_${UNIQUE_ID}
|
|
|
|
# Create context
|
|
Run Process ${PYTHON} -m cleveragents actor run
|
|
... -c ${SIMPLE_CONFIG}
|
|
... --context ${context_name}
|
|
... --context-dir ${CONTEXT_DIR}
|
|
... --unsafe
|
|
... --allow-rxpy-in-run-mode
|
|
... -p "test"
|
|
|
|
# Clear it
|
|
${result} = Run Process ${PYTHON} -m cleveragents context clear
|
|
... ${context_name}
|
|
... --context-dir ${CONTEXT_DIR}
|
|
... --yes
|
|
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Directory Should Exist ${CONTEXT_DIR}/${context_name}
|
|
|
|
*** Keywords ***
|
|
Setup Test Environment
|
|
${timestamp} = Get Current Date result_format=%Y%m%d_%H%M%S
|
|
${random} = Evaluate random.randint(1000, 9999) modules=random
|
|
Set Suite Variable ${UNIQUE_ID} ${timestamp}_${random}
|
|
Set Suite Variable ${TEMP} ${TEMPDIR}/ca_test_${UNIQUE_ID}
|
|
Set Suite Variable ${CONTEXT_DIR} ${TEMP}/contexts
|
|
Create Directory ${TEMP}
|
|
Create Directory ${CONTEXT_DIR}
|
|
|
|
Cleanup Test Environment
|
|
Run Keyword And Ignore Error Remove Directory ${TEMP} recursive=True
|