forked from HAL9000/cleveragents-core
3eecb79003
TDD expected-fail tests proving bug #822 exists: CheckpointService.rollback_to_checkpoint() returns a successful RollbackResult but does not execute git reset --hard. Files modified after the checkpoint remain unchanged after rollback. Also fixes Robot Framework timeout robustness across the entire test suite: all Run Process calls now use on_timeout=kill (prevents SIGTERM-induced -15 exit codes under CI load) and timeouts increased to 120s (prevents premature kills during heavy parallel execution). ISSUES CLOSED: #839
57 lines
3.2 KiB
Plaintext
57 lines
3.2 KiB
Plaintext
*** Settings ***
|
|
Documentation Integration smoke test for session list DI error (bug #554).
|
|
... Regression tests verifying that the DI container fix for
|
|
... session list works correctly. Bug #554 is now fixed.
|
|
Resource ${CURDIR}/common.resource
|
|
Library Process
|
|
Library OperatingSystem
|
|
Suite Setup Setup Test Environment
|
|
Suite Teardown Cleanup Test Environment
|
|
|
|
*** Comments ***
|
|
# NOTE: ``Should Contain`` and ``Should Not Contain`` are case-sensitive
|
|
# by default in Robot Framework. The assertions below rely on the exact
|
|
# output format produced by the CLI:
|
|
# - "AttributeError" (Python exception class name, title-case)
|
|
# If the production code changes its error message casing, update these
|
|
# assertions accordingly.
|
|
|
|
*** Test Cases ***
|
|
Session List After Init Should Not Error
|
|
[Documentation] After agents init, session list should exit 0 and show
|
|
... "No sessions found" rather than a DI AttributeError.
|
|
[Tags] tdd_bug tdd_bug_554
|
|
${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='sle_554_')
|
|
${init}= Run Process ${PYTHON} -m cleveragents init sle-test
|
|
... timeout=120s on_timeout=kill cwd=${tmpdir}
|
|
Should Be Equal As Integers ${init.rc} 0
|
|
... msg=agents init should exit 0 but got ${init.rc}. stderr: ${init.stderr}
|
|
${list}= Run Process ${PYTHON} -m cleveragents session list
|
|
... timeout=120s on_timeout=kill cwd=${tmpdir}
|
|
Should Be Equal As Integers ${list.rc} 0
|
|
... msg=session list should exit 0 but got ${list.rc}. stderr: ${list.stderr}
|
|
Should Not Contain ${list.stderr} AttributeError
|
|
... msg=session list should not raise AttributeError in stderr: ${list.stderr}
|
|
Should Not Contain ${list.stdout} AttributeError
|
|
... msg=session list should not raise AttributeError in stdout: ${list.stdout}
|
|
[Teardown] Remove Directory ${tmpdir} recursive=True
|
|
|
|
Session List JSON Format Does Not Error
|
|
[Documentation] session list --format json should exit 0 without raising
|
|
... a DI AttributeError.
|
|
[Tags] tdd_bug tdd_bug_554
|
|
${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='sle_554_json_')
|
|
${init}= Run Process ${PYTHON} -m cleveragents init sle-json
|
|
... timeout=120s on_timeout=kill cwd=${tmpdir}
|
|
Should Be Equal As Integers ${init.rc} 0
|
|
... msg=agents init should exit 0 but got ${init.rc}. stderr: ${init.stderr}
|
|
${list}= Run Process ${PYTHON} -m cleveragents session list --format json
|
|
... timeout=120s on_timeout=kill cwd=${tmpdir}
|
|
Should Be Equal As Integers ${list.rc} 0
|
|
... msg=session list --format json should exit 0 but got ${list.rc}. stderr: ${list.stderr}
|
|
Should Not Contain ${list.stderr} AttributeError
|
|
... msg=session list --format json should not raise AttributeError in stderr: ${list.stderr}
|
|
Should Not Contain ${list.stdout} AttributeError
|
|
... msg=session list --format json should not raise AttributeError in stdout: ${list.stdout}
|
|
[Teardown] Remove Directory ${tmpdir} recursive=True
|