Orchestrata Ultimate › Tests › Reference › scripts › test_start_test_services

Tests reference — tests/scripts/test_start_test_services.py

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

Prose pending.

tests/scripts/test_start_test_services.py

source · 108 tests · 1563 lines

Tests for scripts/start_test_services.py — the parallel infra readiness checker.

Kind Name Line Description
function test_load_dotenv_sets_a_currently_unset_real_key 322
function test_load_dotenv_skips_keys_already_present 338
function test_module_reimport_prints_loaded_count_when_vars_were_missing 345 Covers the module-level if _loaded: print(...) banner: by the time
function test_env_helper_default_and_present 366
function test_service_result_emoji_all_statuses 378
function test_infra_report_summary_all_ok 390
function test_infra_report_summary_lists_failed_services 400
function test_cleanup_noop_when_not_enabled 420
function test_cleanup_terminates_tracked_process 433
function test_cleanup_kills_process_that_ignores_sigterm 448 The TimeoutExpired -> proc.kill() branch — a real child that traps
function test_port_open_true_against_real_redis 476
function test_port_open_false_against_closed_local_port 480
function test_port_open_false_on_resolution_exception 484
function test_wait_for_port_true_when_already_open 488
function test_wait_for_port_false_when_never_opens 492 The timeout branch is verified, not timed; keep the wait tiny.
function test_run_bg_spawns_and_tracks_process 501
function test_redis_config_defaults 516
function test_check_redis_running_real 522
function test_check_redis_failed_unreachable 528
function test_start_redis_already_up_real 535
function test_start_redis_incus_not_found 541
function test_verify_redis_running_real 563
function test_verify_redis_failed_unreachable 569
function test_graph_config_parses_bolt_uri 589
function test_graph_config_strips_trailing_path_segment 594
function test_graph_config_empty_uri_returns_zero_port_not_valueerror 599 Regression for F5: an unset KG_ROUTING_URI/KG_URI/MEMGRAPH_URI used
function test_graph_config_portless_uri_returns_zero_port 611 A host with no :port segment must not raise either.
function test_kg_uri_falls_back_through_memgraph_then_kg_uri 617 Regression for F5's dead-code cleanup in _kg_uri(): the fallback
function test_check_graph_unset_env_reports_failed_row_not_traceback 630 Regression for F5: check_graph() must report a clean "failed" row
function test_check_graph_running_real 643
function test_check_graph_failed_unreachable 649
function test_start_graph_already_running_real 655 An already-up graph reports as started (or running, for a cluster
function test_start_graph_incus_not_found 662 With no incus on PATH, start_graph cannot start anything.
function test_start_graph_reports_failed_when_cluster_unreachable 680 A down graph is reported, never silently started.
function test_verify_graph_running_real 693
function test_verify_graph_failed_unreachable 705
function test_gateway_config_default 716
function test_gateway_pid_missing_file 730
function test_gateway_pid_invalid_content 736
function test_gateway_pid_stale_process 742
function test_gateway_pid_valid_process 751
function test_gateway_health_success_against_real_protocol_server 762
function test_gateway_health_failure_against_raw_listener 767
function test_gateway_health_failure_connection_refused 772
function test_gateway_health_failure_auth_rejected 776
function test_stop_gateway_no_pid 781
function test_stop_gateway_graceful 789 _stop_gateway() only signals the raw PID (no Popen handle of its
function test_stop_gateway_sigkills_when_sigterm_is_ignored 814 A real child that traps SIGTERM: _stop_gateway()'s drain poll loop must
function test_check_gateway_running_real 837
function test_check_gateway_not_running 843
function test_check_gateway_port_open_without_pid_file_is_judged_on_health 859 No PID file is not a verdict — the health check is.
function test_check_gateway_externally_managed_gateway_reports_running 882 The live gateway is systemd-managed, so this script writes no PID file
function test_check_gateway_stale_pid_file_cleaned_up 896
function test_check_gateway_port_open_health_check_fails 918
function test_start_gateway_idempotent_already_running_real 940
function test_start_gateway_refuses_foreign_process 946
function test_verify_gateway_success_real 960
function test_verify_gateway_failure 966
function test_kernel_config_not_configured_when_unset 983
function test_kernel_config_empty_string_regression 990 Regression for the ValueError crash fixed in this diff: a CXP_GRPC_PORT
function test_kernel_config_configured 1000
function test_check_kernel_not_configured 1007
function test_check_kernel_failed_not_listening 1014
function test_kernel_config_honors_cxp_grpc_host 1023 _kernel_config must read CXP_GRPC_HOST from the active env profile, not
function test_check_kernel_running 1032
function test_start_kernel_not_configured 1040
function test_start_kernel_configured_real_spawn_times_out 1046 A real, configured kernel spawn: no live kernel process exists in this
function test_start_kernel_remote_host_refuses_spawn 1076 When CXP_GRPC_HOST is a remote (containerized) endpoint that is DOWN,
function test_verify_kernel_not_configured 1093
function test_verify_kernel_real_cxp_transport 1099 verify_kernel reports OK against the live test kernel.
function test_gateway_info_success_against_real_protocol_server 1119
function test_gateway_info_failure_against_raw_listener 1134
function test_gateway_info_failure_connection_refused 1139
function test_gateway_info_failure_auth_rejected 1143
function test_check_kernel_link_passes_when_mode_is_grpc 1148
function test_check_kernel_link_fails_when_mode_is_in_process 1168
function test_check_kernel_link_fails_when_mode_is_unavailable 1178
function test_check_kernel_link_fails_when_kernel_block_missing 1187 Mirrors the CURRENT real gateway.info shape (handle_info in
function test_check_kernel_link_fails_when_kernel_block_malformed 1201
function test_check_kernel_link_fails_when_gateway_unreachable 1210
function test_main_prints_all_ready_when_link_reports_grpc 1217
function test_main_fails_closed_when_link_reports_in_process 1238 The core anti-false-green assertion this whole branch exists for: a
function test_main_fails_closed_when_link_kernel_block_missing 1256
function test_run_all_skip_kernel_cascades_to_link 1268 --skip kernel alone (gateway left running for real, per
function test_run_all_skip_gateway_cascades_to_link 1278
function test_run_all_explicit_skip_link 1284
function test_run_one_running_and_verify_ok 1314
function test_run_one_running_but_verify_fails 1319
function test_run_one_down_status_only_mode 1325
function test_run_one_down_optional_service_skipped 1330
function test_run_one_down_required_start_fails 1340
function test_run_one_down_required_start_succeeds 1346
function test_run_one_down_required_started_but_verify_fails 1351
function test_run_all_skip_everything_reports_real_ports 1362
function test_run_all_status_only_real_infra 1375
function test_run_all_skip_graph_with_unset_env_does_not_crash 1383 Regression for F5: --skip graph with KG_ROUTING_URI/KG_URI unset
function test_run_all_skip_gateway_and_kernel_real_redis_graph 1397
function test_main_status_json 1421
function test_main_status_text 1430
function test_main_skip_parsing_normalizes_case_and_whitespace 1437
function test_main_skip_neo4j_deprecated_alias_maps_to_graph 1451 --skip neo4j is deprecated muscle memory from before the graph-rename
function test_main_start_mode_all_ready_returns_0 1471 Not --status: exercises the exit-code-gates-on-readiness path. Gateway
function test_main_start_mode_failure_returns_1 1486
function test_validate_env_or_exit_passes_silently_with_real_env 1501 The real dev .env has every REQUIRED key set, so the preflight must not
function test_validate_env_or_exit_exits_nonzero_when_required_key_missing 1507
function test_main_aborts_before_service_checks_when_required_key_missing 1521 main() calls the preflight first: a missing REQUIRED key must abort
function test_check_kernel_link_fails_when_wired_at_boot_but_dead_now 1537 mode=grpc + wired=false means the kernel answered at BOOT and does not
function test_check_kernel_link_fails_when_wired_field_is_absent 1556 A build that reports mode but omits liveness is UNKNOWN, not OK.