2688c85769
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 19s
CI / lint (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 28s
CI / security (pull_request) Successful in 54s
CI / typecheck (pull_request) Successful in 1m25s
CI / e2e_tests (pull_request) Successful in 2m33s
CI / unit_tests (pull_request) Successful in 3m4s
CI / integration_tests (pull_request) Successful in 3m33s
CI / docker (pull_request) Successful in 1m7s
CI / coverage (pull_request) Successful in 5m50s
CI / lint (push) Successful in 18s
CI / build (push) Successful in 33s
CI / quality (push) Successful in 47s
CI / typecheck (push) Successful in 49s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 52s
CI / e2e_tests (push) Successful in 2m9s
CI / unit_tests (push) Successful in 3m32s
CI / integration_tests (push) Successful in 3m41s
CI / docker (push) Successful in 56s
CI / coverage (push) Successful in 6m10s
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (pull_request) Successful in 40m21s
Implement SandboxStrategyProtocol, a 9-method @runtime_checkable Protocol enabling third-party sandbox strategy registration. Includes: - SandboxStrategyProtocol with create/read/write/diff/commit/rollback/checkpoint/ restore_checkpoint/cleanup methods - SandboxRef (frozen dataclass) and DiffView/DiffEntry (Pydantic models) - SandboxStrategyRegistry with config-driven registration, Protocol validation, thread safety, and clear/list/has operations - BuiltInSandboxStrategyAdapter wrapping existing Sandbox implementations to conform to the new Protocol - CustomStrategyConfig for YAML/dict-based strategy registration - SandboxFactory integration with custom_registry parameter, has_custom_strategy() and get_custom_strategy_class() - 25 Behave BDD scenarios (85 steps) covering protocol, registry, adapter, config, and factory integration - 8 Robot Framework integration tests with real filesystem operations - ASV benchmarks for registry and adapter operations - Developer documentation ISSUES CLOSED: #586
70 lines
3.6 KiB
Plaintext
70 lines
3.6 KiB
Plaintext
*** Settings ***
|
|
Documentation Integration tests for custom sandbox strategy registration.
|
|
... Covers SandboxStrategyProtocol, SandboxStrategyRegistry,
|
|
... BuiltInSandboxStrategyAdapter, CustomStrategyConfig, and
|
|
... SandboxFactory custom strategy integration.
|
|
... Based on issue #586.
|
|
Resource ${CURDIR}/common.resource
|
|
Suite Setup Setup Test Environment
|
|
Suite Teardown Cleanup Test Environment
|
|
|
|
*** Variables ***
|
|
${HELPER_SCRIPT} robot/helper_custom_sandbox_strategy.py
|
|
|
|
*** Test Cases ***
|
|
SandboxRef Creation And Immutability
|
|
[Documentation] Verify SandboxRef creation, properties, and frozen semantics
|
|
[Tags] sandbox strategy ref
|
|
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} sandbox-ref-lifecycle cwd=${WORKSPACE}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} sandbox-ref-lifecycle-ok
|
|
|
|
DiffView And DiffEntry Models
|
|
[Documentation] Verify DiffView and DiffEntry creation and validation
|
|
[Tags] sandbox strategy diff
|
|
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} diff-view-lifecycle cwd=${WORKSPACE}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} diff-view-lifecycle-ok
|
|
|
|
SandboxStrategyProtocol Runtime Check
|
|
[Documentation] Verify SandboxStrategyProtocol is runtime_checkable with 9 methods
|
|
[Tags] sandbox strategy protocol
|
|
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} protocol-check cwd=${WORKSPACE}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} protocol-check-ok
|
|
|
|
SandboxStrategyRegistry Lifecycle
|
|
[Documentation] Verify registry register, lookup, config-driven, protocol validation, clear
|
|
[Tags] sandbox strategy registry
|
|
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} registry-lifecycle cwd=${WORKSPACE}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} registry-lifecycle-ok
|
|
|
|
BuiltInSandboxStrategyAdapter Full Lifecycle
|
|
[Documentation] Verify adapter create/read/write/diff/cleanup with real filesystem
|
|
[Tags] sandbox strategy adapter
|
|
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} adapter-lifecycle cwd=${WORKSPACE}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} adapter-lifecycle-ok
|
|
|
|
Adapter Checkpoint And Restore
|
|
[Documentation] Verify adapter checkpoint save and restore operations
|
|
[Tags] sandbox strategy adapter checkpoint
|
|
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} adapter-checkpoint cwd=${WORKSPACE}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} adapter-checkpoint-ok
|
|
|
|
CustomStrategyConfig Validation
|
|
[Documentation] Verify CustomStrategyConfig rejects empty name, module, class_name
|
|
[Tags] sandbox strategy config
|
|
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} config-validation cwd=${WORKSPACE}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} config-validation-ok
|
|
|
|
SandboxFactory Custom Strategy Integration
|
|
[Documentation] Verify SandboxFactory with custom registry lookup
|
|
[Tags] sandbox strategy factory
|
|
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} factory-custom-integration cwd=${WORKSPACE}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} factory-custom-integration-ok
|