Expand description
Test worker configuration loading for true E2E tests.
This module handles loading and validating worker configurations specifically for end-to-end testing scenarios that require real SSH-accessible worker machines.
§Configuration File
Tests use the configuration in tests/true_e2e/workers_test.toml.
Override with the RCH_E2E_WORKERS_CONFIG environment variable.
§Example Configuration
[settings]
default_timeout_secs = 300
ssh_connection_timeout_secs = 10
remote_work_dir = "/tmp/rch_test"
[[workers]]
id = "test-worker"
host = "192.168.1.100"
user = "ubuntu"
identity_file = "~/.ssh/id_rsa"
total_slots = 16
enabled = trueStructs§
- Test
Settings - Test-specific settings for E2E tests.
- Test
Worker Entry - Single worker entry in test configuration.
- Test
Workers Config - Complete test worker configuration.
Enums§
- Test
Config Error - Error type for configuration operations.
Constants§
- DEFAULT_
CONFIG_ PATH - Default config file path relative to workspace root.
- ENV_
SKIP_ ALL_ TESTS - Environment variable to skip all true E2E tests.
- ENV_
SKIP_ WORKER_ CHECK - Environment variable to skip worker availability checks.
- ENV_
TIMEOUT_ SECS - Environment variable to override command timeout.
- ENV_
WORKERS_ CONFIG - Environment variable to override config file location.
Functions§
- expand_
tilde_ path - Expand tilde (~) in a path to the user’s home directory.
- get_
config_ path - Get the configuration file path, considering environment override.
- is_
mock_ ssh_ mode - Check if mock SSH mode is enabled (for CI testing without real workers).
- require_
workers - Load worker config and verify at least one reachable worker. Returns None when tests should be skipped, with structured logs explaining why.
- should_
skip_ all_ tests - Check if all true E2E tests should be skipped.
- should_
skip_ worker_ check - Check if worker availability checks should be skipped.
Type Aliases§
- Test
Config Result - Result type for configuration operations.