# Test Command Module # Main entry point for test environment commands export use ../test_environments.nu * # Main test command dispatcher export def main [ subcommand?: string ...args ]: nothing -> nothing { match $subcommand { "env" => { # Delegate to test_environments.nu ^$"((get-provisioning-name))" test env ...$args } "topology" => { ^$"((get-provisioning-name))" test topology ...$args } "quick" => { ^$"((get-provisioning-name))" test quick ...$args } "help" | "-h" | "--help" => { print_test_help } _ => { if ($subcommand | is-empty) { print_test_help } else { _print $"Unknown test subcommand: ($subcommand)" _print "Run 'provisioning test help' for available commands" } } } } def print_test_help []: nothing -> nothing { _print $" (_ansi cyan_bold)Test Environment Management(_ansi reset) (_ansi green_bold)Environment Commands:(_ansi reset) test env create Create test environment from config test env single Create single taskserv test test env server Create server simulation test test env cluster Create cluster topology test test env list List all test environments test env get Get environment details test env run Run tests in environment test env logs Get environment logs test env status Show environment status test env cleanup Cleanup environment (_ansi green_bold)Topology Commands:(_ansi reset) test topology list List available topology templates test topology load Load topology template (_ansi green_bold)Quick Test:(_ansi reset) test quick Quick test (create, run, cleanup) (_ansi green_bold)Examples:(_ansi reset) # Single taskserv test provisioning test env single kubernetes --auto-start --auto-cleanup # Server simulation with multiple taskservs provisioning test env server web-01 [containerd kubernetes cilium] --auto-start # Cluster from template provisioning test topology load kubernetes_3node | test env cluster kubernetes # Quick test provisioning test quick redis (_ansi green_bold)Flags:(_ansi reset) --infra Infrastructure context --auto-start Auto-start tests after creation --auto-cleanup Auto-cleanup after completion --cpu CPU millicores (default: 1000) --memory Memory MB (default: 2048) (_ansi default_dimmed)💡 Test environments run in isolated Docker containers Ensure Docker daemon is running before using test commands(_ansi reset) " }