Orchestrata Ultimate › Tests › Reference › kernel › test_cli_main

Tests reference — tests/kernel/test_cli_main.py

Module of tests/kernel, split out because the directory page would be too large.

Prose pending.

tests/kernel/test_cli_main.py

source · 49 tests · 688 lines

Tests for kernel/cli_main.py helpers and CLI commands.

Covers: agents.volk_registry, core.state.state_manager, infra.prolog_bridge, kernel.cli_main, core.state/ (package), kernel/ (package), postman/ (package)

Kind Name Line Description
class TestLoadConfig 48 Tests for _load_config.
method TestLoadConfig.test_no_path_no_env 51
method TestLoadConfig.test_changeme_sentinel_treated_as_unset 55 An unsubstituted .env template (CHANGEME_*) means 'not configured'.
method TestLoadConfig.test_missing_file_raises 64
method TestLoadConfig.test_valid_yaml 69
method TestLoadConfig.test_empty_yaml 79
class TestReadPidFile 90 Tests for _read_pid_file (used by stop to locate gateway/kernel
method TestReadPidFile.test_missing_file_returns_none 94
method TestReadPidFile.test_live_pid_returns_the_pid 97
method TestReadPidFile.test_non_integer_content_returns_none 104
method TestReadPidFile.test_stale_pid_returns_none 109
class TestResolveEnvVars 118 Tests for _resolve_env_vars.
method TestResolveEnvVars.test_string_no_placeholder 121
method TestResolveEnvVars.test_string_with_existing_env_var 124
method TestResolveEnvVars.test_string_with_default 130
method TestResolveEnvVars.test_string_missing_no_default 134
method TestResolveEnvVars.test_dict_recursive 137
method TestResolveEnvVars.test_list_recursive 142
method TestResolveEnvVars.test_nested_structure 147
class TestSetupLogging 152 Tests for _setup_logging.
method TestSetupLogging.test_text_format 155
method TestSetupLogging.test_json_format 161
method TestSetupLogging.test_invalid_level_defaults_to_info 167
class TestCLICommands 174 Tests for CLI commands using Click runner.
method TestCLICommands.test_version 177
method TestCLICommands.test_status 183
method TestCLICommands.test_init 198
method TestCLICommands.test_init_rejects_bad_name 210
method TestCLICommands.test_stop 217
method TestCLICommands.test_agents_list 237
method TestCLICommands.test_agents_health 248
method TestCLICommands.test_governance_check 256
method TestCLICommands.test_governance_log 262
method TestCLICommands.test_governance_policies 268
method TestCLICommands.test_verify_no_spec 276
method TestCLICommands.test_verify_with_spec 286
method TestCLICommands.test_knowledge_query 292
method TestCLICommands.test_knowledge_query_invalid_cypher_fails_cleanly 300
method TestCLICommands.test_session_help 309
method TestCLICommands.test_config_team 315
method TestCLICommands.test_config_team_remove 332
method TestCLICommands.test_reject 348
class TestConsoleEntryPoint 358 The orchestrata console-script entry point (SPEC-000 / K4).
method TestConsoleEntryPoint.test_main_entry_is_callable 381
method TestConsoleEntryPoint.test_entry_group_lists_all_commands 384
method TestConsoleEntryPoint.test_entry_version_runs 391
class TestMainEntryPointDirect 397 Covers main()'s in-process cli() call.
method TestMainEntryPointDirect.test_main_invokes_cli_and_exits_zero 405
class TestSessionCallback 418 The session group's own callback body (reached only when the group
method TestSessionCallback.test_session_callback_prints_hint 423
class TestHealthCommandSuccess 432 The health command's success path (data = json.loads(...); echo).
method TestHealthCommandSuccess.test_health_reports_alive_when_server_running 435
class TestBootStartServices 466 _boot_start_services wires the health server to the readiness event.
method TestBootStartServices.test_starts_health_server_and_sets_ready 469
class TestBootCreateComponents 497 _boot_create_components boots the real kernel/postman/state-manager
method TestBootCreateComponents.test_creates_and_registers_real_components 501
class TestBootIntentPipeline 530 _boot_intent_pipeline loads the Prolog rules and starts the real
method TestBootIntentPipeline.test_loads_prolog_bridge_and_volk_registry 537
class TestBootAgentRuntime 565 _boot_agent_runtime serves the canonical CXP volk kernel in-process
method TestBootAgentRuntime.test_starts_real_cxp_kernel_component 569
class TestBootMonolithicLifecycle 604 Exercises the full monolithic boot + graceful-shutdown lifecycle for
method TestBootMonolithicLifecycle.test_full_boot_then_signal_shutdown 611
class TestStartCommandFullBoot 648 The start command's success path: logger.info(...) followed by
method TestStartCommandFullBoot.test_start_boots_and_shuts_down_cleanly 653