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
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
96 lines
3.5 KiB
Plaintext
96 lines
3.5 KiB
Plaintext
*** Settings ***
|
|
Documentation Integration test for Scientific Paper Writer context management
|
|
... SEC1: Uses simple_echo_config.yaml which requires code blocks.
|
|
Library Process
|
|
Library OperatingSystem
|
|
Library String
|
|
Library DateTime
|
|
Resource ${CURDIR}/v2_paths.resource
|
|
Force Tags code_blocks
|
|
Suite Setup Setup Test Environment
|
|
Suite Teardown Cleanup Test Environment
|
|
|
|
*** Variables ***
|
|
${SIMPLE_CONFIG} ${V2_CONFIG_DIR}/simple_echo_config.yaml
|
|
${CONTEXT_DIR} ${TEMPDIR}/sciwri_contexts
|
|
${UNIQUE_ID} ${EMPTY}
|
|
${TEMP} ${EMPTY}
|
|
|
|
*** Test Cases ***
|
|
Test Context Export Import Commands
|
|
[Documentation] Test exporting and importing context
|
|
${source_ctx} = Set Variable export_${UNIQUE_ID}
|
|
${import_ctx} = Set Variable import_${UNIQUE_ID}
|
|
${export_file} = Set Variable ${TEMP}/export.json
|
|
|
|
# Create source context with simple config
|
|
Run Process ${PYTHON} -m cleveragents actor run
|
|
... -c ${SIMPLE_CONFIG}
|
|
... --context ${source_ctx}
|
|
... --context-dir ${CONTEXT_DIR}
|
|
... --unsafe
|
|
... --allow-rxpy-in-run-mode
|
|
... test-actor Hello world
|
|
... timeout=120s on_timeout=kill
|
|
|
|
# Export it
|
|
${result} = Run Process ${PYTHON} -m cleveragents context export
|
|
... ${source_ctx} ${export_file}
|
|
... --context-dir ${CONTEXT_DIR}
|
|
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
File Should Exist ${export_file}
|
|
|
|
# Import to new context
|
|
${result} = Run Process ${PYTHON} -m cleveragents context import
|
|
... ${import_ctx} ${export_file}
|
|
... --context-dir ${CONTEXT_DIR}
|
|
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Directory Should Exist ${CONTEXT_DIR}/${import_ctx}
|
|
|
|
Test Context List Command
|
|
[Documentation] Test listing contexts
|
|
${ctx1} = Set Variable list1_${UNIQUE_ID}
|
|
${ctx2} = Set Variable list2_${UNIQUE_ID}
|
|
|
|
# Create two contexts with simple echo config
|
|
Run Process ${PYTHON} -m cleveragents actor run
|
|
... -c ${SIMPLE_CONFIG}
|
|
... --context ${ctx1}
|
|
... --context-dir ${CONTEXT_DIR}
|
|
... --unsafe
|
|
... --allow-rxpy-in-run-mode
|
|
... test-actor First
|
|
... timeout=120s on_timeout=kill
|
|
|
|
Run Process ${PYTHON} -m cleveragents actor run
|
|
... -c ${SIMPLE_CONFIG}
|
|
... --context ${ctx2}
|
|
... --context-dir ${CONTEXT_DIR}
|
|
... --unsafe
|
|
... --allow-rxpy-in-run-mode
|
|
... test-actor Second
|
|
... timeout=120s on_timeout=kill
|
|
|
|
# List them
|
|
${result} = Run Process ${PYTHON} -m cleveragents context list
|
|
... --context-dir ${CONTEXT_DIR}
|
|
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} ${ctx1}
|
|
Should Contain ${result.stdout} ${ctx2}
|
|
|
|
*** 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}/sciwri_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
|