diff --git a/tests/integration/complex_monitoring/BUILD b/tests/integration/complex_monitoring/BUILD index 330964c56..15306f47e 100644 --- a/tests/integration/complex_monitoring/BUILD +++ b/tests/integration/complex_monitoring/BUILD @@ -14,8 +14,8 @@ load("@rules_cc//cc:cc_binary.bzl", "cc_binary") load("//tests/utils/bazel:integration.bzl", "integration_test") cc_binary( - name = "control_client_mock", - srcs = ["mock_control_client.cpp"], + name = "control_client_test_driver", + srcs = ["control_client_test_driver.cpp"], deps = [ "//score/launch_manager:control_cc", "//score/launch_manager:lifecycle_cc", @@ -51,7 +51,7 @@ integration_test( srcs = ["complex_monitoring.py"], binaries = [ ":component_complex_monitoring", - ":control_client_mock", + ":control_client_test_driver", "//score/launch_manager", "//tests/utils/test_helper:verification_process", ], diff --git a/tests/integration/complex_monitoring/complex_monitoring.json b/tests/integration/complex_monitoring/complex_monitoring.json index f01be07ad..b8e3ed2cf 100644 --- a/tests/integration/complex_monitoring/complex_monitoring.json +++ b/tests/integration/complex_monitoring/complex_monitoring.json @@ -36,9 +36,9 @@ } }, "components": { - "control_client_mock": { + "control_client_test_driver": { "component_properties": { - "binary_name": "control_client_mock", + "binary_name": "control_client_test_driver", "application_profile": { "application_type": "State_Manager", "alive_supervision": { @@ -48,7 +48,7 @@ }, "deployment_config": { "environmental_variables": { - "PROCESSIDENTIFIER": "control_client_mock" + "PROCESSIDENTIFIER": "control_client_test_driver" } } }, @@ -91,12 +91,12 @@ "run_targets": { "Startup": { "depends_on": [ - "control_client_mock" + "control_client_test_driver" ] }, "run_target_complex_monitoring": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "component_complex_monitoring" ], "recovery_action": { @@ -115,7 +115,7 @@ }, "fallback_run_target": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "verification_component" ] } diff --git a/tests/integration/complex_monitoring/complex_monitoring.py b/tests/integration/complex_monitoring/complex_monitoring.py index 498ab6828..c09131d63 100644 --- a/tests/integration/complex_monitoring/complex_monitoring.py +++ b/tests/integration/complex_monitoring/complex_monitoring.py @@ -43,4 +43,6 @@ def test_complex_monitoring(target, setup_test, assert_test_results, remote_test timeout_s=4.0, ) - assert_test_results({"component_complex_monitoring.xml", "mock_control_client.xml"}) + assert_test_results( + {"component_complex_monitoring.xml", "control_client_test_driver.xml"} + ) diff --git a/tests/integration/complex_monitoring/mock_control_client.cpp b/tests/integration/complex_monitoring/control_client_test_driver.cpp similarity index 100% rename from tests/integration/complex_monitoring/mock_control_client.cpp rename to tests/integration/complex_monitoring/control_client_test_driver.cpp diff --git a/tests/integration/crash_on_startup/BUILD b/tests/integration/crash_on_startup/BUILD index 7d47df045..620abbc63 100644 --- a/tests/integration/crash_on_startup/BUILD +++ b/tests/integration/crash_on_startup/BUILD @@ -14,8 +14,8 @@ load("@rules_cc//cc:cc_binary.bzl", "cc_binary") load("//tests/utils/bazel:integration.bzl", "integration_test") cc_binary( - name = "control_client_mock", - srcs = ["mock_control_client.cpp"], + name = "control_client_test_driver", + srcs = ["control_client_test_driver.cpp"], deps = [ "//score/launch_manager:control_cc", "//score/launch_manager:lifecycle_cc", @@ -28,7 +28,7 @@ integration_test( name = "crash_on_startup", srcs = ["crash_on_startup.py"], binaries = [ - ":control_client_mock", + ":control_client_test_driver", "//score/launch_manager", "//tests/utils/test_helper:process_crashing_on_startup_n_times", "//tests/utils/test_helper:verification_process", diff --git a/tests/integration/crash_on_startup/mock_control_client.cpp b/tests/integration/crash_on_startup/control_client_test_driver.cpp similarity index 100% rename from tests/integration/crash_on_startup/mock_control_client.cpp rename to tests/integration/crash_on_startup/control_client_test_driver.cpp diff --git a/tests/integration/crash_on_startup/crash_on_startup.json b/tests/integration/crash_on_startup/crash_on_startup.json index 124aed307..96685ae08 100644 --- a/tests/integration/crash_on_startup/crash_on_startup.json +++ b/tests/integration/crash_on_startup/crash_on_startup.json @@ -25,9 +25,9 @@ } }, "components": { - "control_client_mock": { + "control_client_test_driver": { "component_properties": { - "binary_name": "control_client_mock", + "binary_name": "control_client_test_driver", "application_profile": { "application_type": "State_Manager", "alive_supervision": { @@ -39,7 +39,7 @@ "ready_timeout": 1.0, "shutdown_timeout": 1.0, "environmental_variables": { - "PROCESSIDENTIFIER": "control_client_mock" + "PROCESSIDENTIFIER": "control_client_test_driver" } } }, @@ -109,24 +109,24 @@ "run_targets": { "Startup": { "depends_on": [ - "control_client_mock" + "control_client_test_driver" ] }, "run_target_crash_on_startup_two_times": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "process_crashing_on_startup_twice" ] }, "run_target_crash_on_startup_three_times": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "process_crashing_on_startup_three_times" ] }, "run_target_crash_on_startup_once_but_no_retries": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "process_crashing_on_startup_no_retries" ], "recovery_action": { @@ -145,7 +145,7 @@ }, "fallback_run_target": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "verification_component" ] } diff --git a/tests/integration/crash_on_startup/crash_on_startup.py b/tests/integration/crash_on_startup/crash_on_startup.py index 0e4e2f7ee..7e2bada2f 100644 --- a/tests/integration/crash_on_startup/crash_on_startup.py +++ b/tests/integration/crash_on_startup/crash_on_startup.py @@ -61,7 +61,9 @@ def test_crash_on_startup( crash_report_names = { n: f"process_crashing_on_startup_n_times_n_equals_{n}.xml" for n in (1, 2, 3) } - assert_test_results({"mock_control_client.xml", *crash_report_names.values()}) + assert_test_results( + {"control_client_test_driver.xml", *crash_report_names.values()} + ) # The number of crashes is recorded in each report and must match the configured crash count. for n, report_name in crash_report_names.items(): diff --git a/tests/integration/fallback_to_same_target_restarts/BUILD b/tests/integration/fallback_to_same_target_restarts/BUILD index 8a3873c1f..9c39ec771 100644 --- a/tests/integration/fallback_to_same_target_restarts/BUILD +++ b/tests/integration/fallback_to_same_target_restarts/BUILD @@ -14,8 +14,8 @@ load("@rules_cc//cc:cc_binary.bzl", "cc_binary") load("//tests/utils/bazel:integration.bzl", "integration_test") cc_binary( - name = "control_client_mock", - srcs = ["mock_control_client.cpp"], + name = "control_client_test_driver", + srcs = ["control_client_test_driver.cpp"], deps = [ "//score/launch_manager:control_cc", "//score/launch_manager:lifecycle_cc", @@ -39,7 +39,7 @@ integration_test( srcs = ["fallback_to_same_target_restarts.py"], binaries = [ ":config", - ":control_client_mock", + ":control_client_test_driver", ":process_crashing_once", "//score/launch_manager", ], diff --git a/tests/integration/fallback_to_same_target_restarts/mock_control_client.cpp b/tests/integration/fallback_to_same_target_restarts/control_client_test_driver.cpp similarity index 97% rename from tests/integration/fallback_to_same_target_restarts/mock_control_client.cpp rename to tests/integration/fallback_to_same_target_restarts/control_client_test_driver.cpp index a00645d61..8225e54b9 100644 --- a/tests/integration/fallback_to_same_target_restarts/mock_control_client.cpp +++ b/tests/integration/fallback_to_same_target_restarts/control_client_test_driver.cpp @@ -20,8 +20,8 @@ #include // Given a correct configuration with: -// - An initial Run Target named "Startup" containing "control_client_mock" -// - A Run Target named "run_target_crashing_app_on_runtime" containing "control_client_mock" and +// - An initial Run Target named "Startup" containing "control_client_test_driver" +// - A Run Target named "run_target_crashing_app_on_runtime" containing "control_client_test_driver" and // "component_crashing_once" TEST(FallbackToSameTargetRestarts, ControlClientMock) diff --git a/tests/integration/fallback_to_same_target_restarts/fallback_to_same_target_restarts.json b/tests/integration/fallback_to_same_target_restarts/fallback_to_same_target_restarts.json index 173ee643c..f09aa5af1 100644 --- a/tests/integration/fallback_to_same_target_restarts/fallback_to_same_target_restarts.json +++ b/tests/integration/fallback_to_same_target_restarts/fallback_to_same_target_restarts.json @@ -42,9 +42,9 @@ } }, "components": { - "control_client_mock": { + "control_client_test_driver": { "component_properties": { - "binary_name": "control_client_mock", + "binary_name": "control_client_test_driver", "application_profile": { "application_type": "State_Manager", "alive_supervision": { @@ -56,7 +56,7 @@ "ready_timeout": 1.0, "shutdown_timeout": 1.0, "environmental_variables": { - "PROCESSIDENTIFIER": "control_client_mock" + "PROCESSIDENTIFIER": "control_client_test_driver" } } }, @@ -78,12 +78,12 @@ "run_targets": { "Startup": { "depends_on": [ - "control_client_mock" + "control_client_test_driver" ] }, "run_target_crashing_app_on_runtime": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "component_crashing_once" ], "recovery_action": { @@ -102,7 +102,7 @@ }, "fallback_run_target": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "component_crashing_once" ] } diff --git a/tests/integration/fallback_to_same_target_restarts/fallback_to_same_target_restarts.py b/tests/integration/fallback_to_same_target_restarts/fallback_to_same_target_restarts.py index 8a02e3ffa..8c22d97c9 100644 --- a/tests/integration/fallback_to_same_target_restarts/fallback_to_same_target_restarts.py +++ b/tests/integration/fallback_to_same_target_restarts/fallback_to_same_target_restarts.py @@ -42,4 +42,4 @@ def test_fallback_to_same_target_restarts( timeout_s=4.0, ) - assert_test_results({"mock_control_client.xml", "process_crashing_once.xml"}) + assert_test_results({"control_client_test_driver.xml", "process_crashing_once.xml"}) diff --git a/tests/integration/process_complex_rep_failure/BUILD b/tests/integration/process_complex_rep_failure/BUILD index 18b57cdcf..e7deefcbb 100644 --- a/tests/integration/process_complex_rep_failure/BUILD +++ b/tests/integration/process_complex_rep_failure/BUILD @@ -14,8 +14,8 @@ load("@rules_cc//cc:cc_binary.bzl", "cc_binary") load("//tests/utils/bazel:integration.bzl", "integration_test") cc_binary( - name = "control_client_mock", - srcs = ["mock_control_client.cpp"], + name = "control_client_test_driver", + srcs = ["control_client_test_driver.cpp"], deps = [ "//score/launch_manager:control_cc", "//score/launch_manager:lifecycle_cc", @@ -40,7 +40,7 @@ integration_test( srcs = ["process_complex_rep_failure.py"], binaries = [ ":complex_reporting_process", - ":control_client_mock", + ":control_client_test_driver", "//score/launch_manager", "//tests/utils/test_helper:verification_process", ], diff --git a/tests/integration/process_complex_rep_failure/mock_control_client.cpp b/tests/integration/process_complex_rep_failure/control_client_test_driver.cpp similarity index 96% rename from tests/integration/process_complex_rep_failure/mock_control_client.cpp rename to tests/integration/process_complex_rep_failure/control_client_test_driver.cpp index 8a3d2b559..c3f075b29 100644 --- a/tests/integration/process_complex_rep_failure/mock_control_client.cpp +++ b/tests/integration/process_complex_rep_failure/control_client_test_driver.cpp @@ -18,12 +18,12 @@ // Given a correct configuration with: // - An initial Run Target named "Startup" containing component named -// "control_client_mock" +// "control_client_test_driver" // - A Run Target named "run_target_app_does_report_krunning_in_time" -// containing "control_client_mock" and +// containing "control_client_test_driver" and // "component_does_report_krunning_in_time" // - A Run Target named "run_target_app_does_not_report_krunning_in_time" -// containing "control_client_mock" and +// containing "control_client_test_driver" and // "component_does_not_report_krunning_in_time" TEST(RecoveryActionComplexRepFailure, ControlClientMock) diff --git a/tests/integration/process_complex_rep_failure/process_complex_rep_failure.json b/tests/integration/process_complex_rep_failure/process_complex_rep_failure.json index 05c04e395..cf53f9be8 100644 --- a/tests/integration/process_complex_rep_failure/process_complex_rep_failure.json +++ b/tests/integration/process_complex_rep_failure/process_complex_rep_failure.json @@ -42,9 +42,9 @@ } }, "components": { - "control_client_mock": { + "control_client_test_driver": { "component_properties": { - "binary_name": "control_client_mock", + "binary_name": "control_client_test_driver", "application_profile": { "application_type": "State_Manager", "alive_supervision": { @@ -56,7 +56,7 @@ "ready_timeout": 1.0, "shutdown_timeout": 1.0, "environmental_variables": { - "PROCESSIDENTIFIER": "control_client_mock" + "PROCESSIDENTIFIER": "control_client_test_driver" } } }, @@ -109,7 +109,7 @@ "run_targets": { "Startup": { "depends_on": [ - "control_client_mock" + "control_client_test_driver" ], "recovery_action": { "switch_run_target": { @@ -119,7 +119,7 @@ }, "run_target_app_does_report_krunning_in_time": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "component_does_report_krunning_in_time" ], "recovery_action": { @@ -130,7 +130,7 @@ }, "run_target_app_does_not_report_krunning_in_time": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "component_does_not_report_krunning_in_time" ], "recovery_action": { @@ -149,7 +149,7 @@ }, "fallback_run_target": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "verification_component" ] } diff --git a/tests/integration/process_complex_rep_failure/process_complex_rep_failure.py b/tests/integration/process_complex_rep_failure/process_complex_rep_failure.py index ea46cd968..1ec705595 100644 --- a/tests/integration/process_complex_rep_failure/process_complex_rep_failure.py +++ b/tests/integration/process_complex_rep_failure/process_complex_rep_failure.py @@ -52,4 +52,6 @@ def test_recovery_action_complex_rep_failure( timeout_s=10.0, ) - assert_test_results({"mock_control_client.xml", "complex_reporting_process.xml"}) + assert_test_results( + {"control_client_test_driver.xml", "complex_reporting_process.xml"} + ) diff --git a/tests/integration/process_crash_monitoring/BUILD b/tests/integration/process_crash_monitoring/BUILD index 38c194cb1..43865f42b 100644 --- a/tests/integration/process_crash_monitoring/BUILD +++ b/tests/integration/process_crash_monitoring/BUILD @@ -14,8 +14,8 @@ load("@rules_cc//cc:cc_binary.bzl", "cc_binary") load("//tests/utils/bazel:integration.bzl", "integration_test") cc_binary( - name = "control_client_mock", - srcs = ["mock_control_client.cpp"], + name = "control_client_test_driver", + srcs = ["control_client_test_driver.cpp"], deps = [ "//score/launch_manager:control_cc", "//score/launch_manager:lifecycle_cc", @@ -39,7 +39,7 @@ integration_test( srcs = ["process_crash_monitoring.py"], binaries = [ ":config", - ":control_client_mock", + ":control_client_test_driver", ":process_crashing_on_runtime", "//score/launch_manager", "//tests/utils/test_helper:verification_process", diff --git a/tests/integration/process_crash_monitoring/mock_control_client.cpp b/tests/integration/process_crash_monitoring/control_client_test_driver.cpp similarity index 97% rename from tests/integration/process_crash_monitoring/mock_control_client.cpp rename to tests/integration/process_crash_monitoring/control_client_test_driver.cpp index 048e3fa2f..4bf9938bb 100644 --- a/tests/integration/process_crash_monitoring/mock_control_client.cpp +++ b/tests/integration/process_crash_monitoring/control_client_test_driver.cpp @@ -20,8 +20,8 @@ #include // Given a correct configuration with: -// - An initial Run Target named "Startup" containing "control_client_mock" -// - A Run Target named "run_target_crashing_app_on_runtime" containing "control_client_mock" and +// - An initial Run Target named "Startup" containing "control_client_test_driver" +// - A Run Target named "run_target_crashing_app_on_runtime" containing "control_client_test_driver" and // "component_crashing_on_runtime" TEST(ProcessCrashMonitoring, ControlClientMock) diff --git a/tests/integration/process_crash_monitoring/process_crash_monitoring.json b/tests/integration/process_crash_monitoring/process_crash_monitoring.json index c3f518171..70afc4f85 100644 --- a/tests/integration/process_crash_monitoring/process_crash_monitoring.json +++ b/tests/integration/process_crash_monitoring/process_crash_monitoring.json @@ -42,9 +42,9 @@ } }, "components": { - "control_client_mock": { + "control_client_test_driver": { "component_properties": { - "binary_name": "control_client_mock", + "binary_name": "control_client_test_driver", "application_profile": { "application_type": "State_Manager", "alive_supervision": { @@ -56,7 +56,7 @@ "ready_timeout": 1.0, "shutdown_timeout": 1.0, "environmental_variables": { - "PROCESSIDENTIFIER": "control_client_mock" + "PROCESSIDENTIFIER": "control_client_test_driver" } } }, @@ -92,12 +92,12 @@ "run_targets": { "Startup": { "depends_on": [ - "control_client_mock" + "control_client_test_driver" ] }, "run_target_crashing_app_on_runtime": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "component_crashing_on_runtime" ], "recovery_action": { @@ -116,7 +116,7 @@ }, "fallback_run_target": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "verification_component" ] } diff --git a/tests/integration/process_crash_monitoring/process_crash_monitoring.py b/tests/integration/process_crash_monitoring/process_crash_monitoring.py index 2b2441c79..72f6a3041 100644 --- a/tests/integration/process_crash_monitoring/process_crash_monitoring.py +++ b/tests/integration/process_crash_monitoring/process_crash_monitoring.py @@ -42,4 +42,6 @@ def test_process_crash_monitoring( timeout_s=10.0, ) - assert_test_results({"mock_control_client.xml", "process_crashing_on_runtime.xml"}) + assert_test_results( + {"control_client_test_driver.xml", "process_crashing_on_runtime.xml"} + ) diff --git a/tests/integration/process_fd_leak/BUILD b/tests/integration/process_fd_leak/BUILD index 4b146f235..33e79c160 100644 --- a/tests/integration/process_fd_leak/BUILD +++ b/tests/integration/process_fd_leak/BUILD @@ -44,10 +44,10 @@ cc_binary( ) cc_binary( - name = "control_client", + name = "control_client_test_driver", srcs = [ "common.hpp", - "control_client.cpp", + "control_client_test_driver.cpp", "get_fds.hpp", ], target_compatible_with = ["@platforms//os:linux"], @@ -64,7 +64,7 @@ integration_test( name = "process_fd_leak", srcs = ["process_fd_leak.py"], binaries = [ - ":control_client", + ":control_client_test_driver", ":native", ":reporting", "//score/launch_manager", diff --git a/tests/integration/process_fd_leak/control_client.cpp b/tests/integration/process_fd_leak/control_client_test_driver.cpp similarity index 100% rename from tests/integration/process_fd_leak/control_client.cpp rename to tests/integration/process_fd_leak/control_client_test_driver.cpp diff --git a/tests/integration/process_fd_leak/process_fd_leak.json b/tests/integration/process_fd_leak/process_fd_leak.json index 2a1c20f3e..d16703e29 100644 --- a/tests/integration/process_fd_leak/process_fd_leak.json +++ b/tests/integration/process_fd_leak/process_fd_leak.json @@ -44,9 +44,9 @@ "binary_name": "native" } }, - "control_client": { + "control_client_test_driver": { "component_properties": { - "binary_name": "control_client", + "binary_name": "control_client_test_driver", "application_profile": { "application_type": "State_Manager", "is_self_terminating": false @@ -66,7 +66,7 @@ "Startup": { "depends_on": [ "native", - "control_client", + "control_client_test_driver", "reporting" ] } diff --git a/tests/integration/process_fd_leak/process_fd_leak.py b/tests/integration/process_fd_leak/process_fd_leak.py index a583627a1..2f524521c 100644 --- a/tests/integration/process_fd_leak/process_fd_leak.py +++ b/tests/integration/process_fd_leak/process_fd_leak.py @@ -37,4 +37,6 @@ def test_process_fd_leak(target, setup_test, assert_test_results, remote_test_di ) # That the process is started and an XML file is produced verifies feat_req__lifecycle__launch_support - assert_test_results({"native.xml", "control_client.xml", "reporting.xml"}) + assert_test_results( + {"native.xml", "control_client_test_driver.xml", "reporting.xml"} + ) diff --git a/tests/integration/process_simple_rep_failure/BUILD b/tests/integration/process_simple_rep_failure/BUILD index 715abda92..f0baf0171 100644 --- a/tests/integration/process_simple_rep_failure/BUILD +++ b/tests/integration/process_simple_rep_failure/BUILD @@ -14,8 +14,8 @@ load("@rules_cc//cc:cc_binary.bzl", "cc_binary") load("//tests/utils/bazel:integration.bzl", "integration_test") cc_binary( - name = "control_client_mock", - srcs = ["mock_control_client.cpp"], + name = "control_client_test_driver", + srcs = ["control_client_test_driver.cpp"], deps = [ "//score/launch_manager:control_cc", "//score/launch_manager:lifecycle_cc", @@ -38,7 +38,7 @@ integration_test( name = "process_simple_rep_failure", srcs = ["process_simple_rep_failure.py"], binaries = [ - ":control_client_mock", + ":control_client_test_driver", ":process_simple_reporting", "//score/launch_manager", "//tests/utils/test_helper:verification_process", diff --git a/tests/integration/process_simple_rep_failure/mock_control_client.cpp b/tests/integration/process_simple_rep_failure/control_client_test_driver.cpp similarity index 96% rename from tests/integration/process_simple_rep_failure/mock_control_client.cpp rename to tests/integration/process_simple_rep_failure/control_client_test_driver.cpp index 53c1e51c9..1a2ac5abc 100644 --- a/tests/integration/process_simple_rep_failure/mock_control_client.cpp +++ b/tests/integration/process_simple_rep_failure/control_client_test_driver.cpp @@ -18,12 +18,12 @@ // Given a correct configuration with: // - An initial Run Target named "Startup" containing component named -// "control_client_mock" +// "control_client_test_driver" // - A Run Target named "run_target_app_does_report_krunning_in_time" -// containing "control_client_mock" and +// containing "control_client_test_driver" and // "component_does_report_krunning_in_time" // - A Run Target named "run_target_app_does_not_report_krunning_in_time" -// containing "control_client_mock" and +// containing "control_client_test_driver" and // "component_does_not_report_krunning_in_time" TEST(RecoveryActionSimpleRepFailure, ControlClientMock) diff --git a/tests/integration/process_simple_rep_failure/process_simple_rep_failure.json b/tests/integration/process_simple_rep_failure/process_simple_rep_failure.json index cfdf4a953..dd443d306 100644 --- a/tests/integration/process_simple_rep_failure/process_simple_rep_failure.json +++ b/tests/integration/process_simple_rep_failure/process_simple_rep_failure.json @@ -42,9 +42,9 @@ } }, "components": { - "control_client_mock": { + "control_client_test_driver": { "component_properties": { - "binary_name": "control_client_mock", + "binary_name": "control_client_test_driver", "application_profile": { "application_type": "State_Manager", "alive_supervision": { @@ -56,7 +56,7 @@ "ready_timeout": 1.0, "shutdown_timeout": 1.0, "environmental_variables": { - "PROCESSIDENTIFIER": "control_client_mock" + "PROCESSIDENTIFIER": "control_client_test_driver" } } }, @@ -109,7 +109,7 @@ "run_targets": { "Startup": { "depends_on": [ - "control_client_mock" + "control_client_test_driver" ], "recovery_action": { "switch_run_target": { @@ -119,7 +119,7 @@ }, "run_target_app_does_report_krunning_in_time": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "component_does_report_krunning_in_time" ], "recovery_action": { @@ -130,7 +130,7 @@ }, "run_target_app_does_not_report_krunning_in_time": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "component_does_not_report_krunning_in_time" ], "recovery_action": { @@ -149,7 +149,7 @@ }, "fallback_run_target": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "verification_component" ] } diff --git a/tests/integration/process_simple_rep_failure/process_simple_rep_failure.py b/tests/integration/process_simple_rep_failure/process_simple_rep_failure.py index 7093c02af..7fda53b82 100644 --- a/tests/integration/process_simple_rep_failure/process_simple_rep_failure.py +++ b/tests/integration/process_simple_rep_failure/process_simple_rep_failure.py @@ -52,4 +52,6 @@ def test_recovery_action_simple_rep_failure( timeout_s=10.0, ) - assert_test_results({"mock_control_client.xml", "process_simple_reporting.xml"}) + assert_test_results( + {"control_client_test_driver.xml", "process_simple_reporting.xml"} + ) diff --git a/tests/integration/process_wrong_binary_failure/BUILD b/tests/integration/process_wrong_binary_failure/BUILD index 48bb3c741..8bc684a77 100644 --- a/tests/integration/process_wrong_binary_failure/BUILD +++ b/tests/integration/process_wrong_binary_failure/BUILD @@ -14,8 +14,8 @@ load("@rules_cc//cc:cc_binary.bzl", "cc_binary") load("//tests/utils/bazel:integration.bzl", "integration_test") cc_binary( - name = "control_client_mock", - srcs = ["mock_control_client.cpp"], + name = "control_client_test_driver", + srcs = ["control_client_test_driver.cpp"], deps = [ "//score/launch_manager:control_cc", "//score/launch_manager:lifecycle_cc", @@ -28,7 +28,7 @@ integration_test( name = "process_wrong_binary_failure", srcs = ["process_wrong_binary_failure.py"], binaries = [ - ":control_client_mock", + ":control_client_test_driver", "//score/launch_manager", "//tests/utils/test_helper:verification_process", ], diff --git a/tests/integration/process_wrong_binary_failure/mock_control_client.cpp b/tests/integration/process_wrong_binary_failure/control_client_test_driver.cpp similarity index 100% rename from tests/integration/process_wrong_binary_failure/mock_control_client.cpp rename to tests/integration/process_wrong_binary_failure/control_client_test_driver.cpp diff --git a/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.json b/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.json index 4a9c074a6..a5e832b31 100644 --- a/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.json +++ b/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.json @@ -42,9 +42,9 @@ } }, "components": { - "control_client_mock": { + "control_client_test_driver": { "component_properties": { - "binary_name": "control_client_mock", + "binary_name": "control_client_test_driver", "application_profile": { "application_type": "State_Manager", "alive_supervision": { @@ -56,7 +56,7 @@ "ready_timeout": 1.0, "shutdown_timeout": 1.0, "environmental_variables": { - "PROCESSIDENTIFIER": "control_client_mock" + "PROCESSIDENTIFIER": "control_client_test_driver" } } }, @@ -94,7 +94,7 @@ "run_targets": { "Startup": { "depends_on": [ - "control_client_mock" + "control_client_test_driver" ], "recovery_action": { "switch_run_target": { @@ -104,7 +104,7 @@ }, "run_target_with_missing_binary": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "component_with_missing_binary" ], "recovery_action": { @@ -123,7 +123,7 @@ }, "fallback_run_target": { "depends_on": [ - "control_client_mock", + "control_client_test_driver", "verification_component" ] } diff --git a/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.py b/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.py index b8a8f1147..35ee446b9 100644 --- a/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.py +++ b/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.py @@ -40,4 +40,4 @@ def test_process_wrong_binary_failure( timeout_s=6, ) - assert_test_results({"mock_control_client.xml"}) + assert_test_results({"control_client_test_driver.xml"}) diff --git a/tests/integration/shutdown_signal/BUILD b/tests/integration/shutdown_signal/BUILD index 620f6f116..61650f644 100644 --- a/tests/integration/shutdown_signal/BUILD +++ b/tests/integration/shutdown_signal/BUILD @@ -19,8 +19,8 @@ cc_library( ) cc_binary( - name = "control_daemon_mock", - srcs = ["mock_control_daemon.cpp"], + name = "control_client_test_driver", + srcs = ["control_client_test_driver.cpp"], deps = [ ":shutdown_signal_common", "//score/launch_manager:control_cc", @@ -46,7 +46,7 @@ integration_test( name = "shutdown_signal", srcs = ["shutdown_signal.py"], binaries = [ - ":control_daemon_mock", + ":control_client_test_driver", ":shutdown_signal_process", "//score/launch_manager", ], diff --git a/tests/integration/shutdown_signal/common.hpp b/tests/integration/shutdown_signal/common.hpp index 6e233ca40..284f268d3 100644 --- a/tests/integration/shutdown_signal/common.hpp +++ b/tests/integration/shutdown_signal/common.hpp @@ -17,7 +17,7 @@ /// @brief Written by gtest_process from within its SIGTERM handler, containing /// its PID as raw bytes. Its existence proves the Launch Manager delivered a -/// SIGTERM to request shutdown, and the PID lets control_daemon_mock confirm the +/// SIGTERM to request shutdown, and the PID lets control_client_test_driver confirm the /// process was subsequently killed. It is written before the process blocks, so /// it survives the subsequent SIGKILL (no code can run after SIGKILL). constexpr std::string_view sigterm_received_file = "sigterm_received"; diff --git a/tests/integration/shutdown_signal/mock_control_daemon.cpp b/tests/integration/shutdown_signal/control_client_test_driver.cpp similarity index 100% rename from tests/integration/shutdown_signal/mock_control_daemon.cpp rename to tests/integration/shutdown_signal/control_client_test_driver.cpp diff --git a/tests/integration/shutdown_signal/shutdown_signal.json b/tests/integration/shutdown_signal/shutdown_signal.json index a1bfc0622..0e1f8ace1 100644 --- a/tests/integration/shutdown_signal/shutdown_signal.json +++ b/tests/integration/shutdown_signal/shutdown_signal.json @@ -21,7 +21,7 @@ "components": { "control_daemon": { "component_properties": { - "binary_name": "control_daemon_mock", + "binary_name": "control_client_test_driver", "application_profile": { "application_type": "State_Manager", "alive_supervision": { diff --git a/tests/integration/shutdown_signal/shutdown_signal.py b/tests/integration/shutdown_signal/shutdown_signal.py index 5430d6c8c..862e3fe0b 100644 --- a/tests/integration/shutdown_signal/shutdown_signal.py +++ b/tests/integration/shutdown_signal/shutdown_signal.py @@ -53,4 +53,6 @@ def test_shutdown_signal(target, setup_test, assert_test_results, remote_test_di timeout_s=10.0, ) - assert_test_results({"mock_control_daemon.xml", "shutdown_signal_process.xml"}) + assert_test_results( + {"control_client_test_driver.xml", "shutdown_signal_process.xml"} + ) diff --git a/tests/integration/shutdown_signal/shutdown_signal_process.cpp b/tests/integration/shutdown_signal/shutdown_signal_process.cpp index ec3bb7c7e..576015bb7 100644 --- a/tests/integration/shutdown_signal/shutdown_signal_process.cpp +++ b/tests/integration/shutdown_signal/shutdown_signal_process.cpp @@ -27,7 +27,7 @@ namespace /// gone, since no code runs after SIGKILL) and then blocks forever instead of /// terminating. Because it never self-terminates, the Launch Manager must /// escalate to SIGKILL to shut it down; the recorded PID then lets -/// control_daemon_mock confirm that the process is truly gone. +/// control_client_test_driver confirm that the process is truly gone. void shutdownSignalHandler(int /*signum*/) { // getpid()/open()/write()/pause() are all async-signal-safe, so this is safe diff --git a/tests/integration/smoke/BUILD b/tests/integration/smoke/BUILD index 127005fe5..5bbf47291 100644 --- a/tests/integration/smoke/BUILD +++ b/tests/integration/smoke/BUILD @@ -14,8 +14,8 @@ load("@rules_cc//cc:defs.bzl", "cc_binary") load("//tests/utils/bazel:integration.bzl", "integration_test") cc_binary( - name = "control_daemon_mock", - srcs = ["mock_control_daemon.cpp"], + name = "control_client_test_driver", + srcs = ["control_client_test_driver.cpp"], data = [], deps = [ "//score/launch_manager:control_cc", @@ -40,7 +40,7 @@ integration_test( name = "smoke", srcs = ["smoke.py"], binaries = [ - ":control_daemon_mock", + ":control_client_test_driver", ":gtest_process", "//score/launch_manager", ], diff --git a/tests/integration/smoke/mock_control_daemon.cpp b/tests/integration/smoke/control_client_test_driver.cpp similarity index 100% rename from tests/integration/smoke/mock_control_daemon.cpp rename to tests/integration/smoke/control_client_test_driver.cpp diff --git a/tests/integration/smoke/lifecycle_smoketest.json b/tests/integration/smoke/lifecycle_smoketest.json index 3c0c736b1..4d5e83010 100644 --- a/tests/integration/smoke/lifecycle_smoketest.json +++ b/tests/integration/smoke/lifecycle_smoketest.json @@ -44,7 +44,7 @@ "components": { "control_daemon": { "component_properties": { - "binary_name": "control_daemon_mock", + "binary_name": "control_client_test_driver", "application_profile": { "application_type": "State_Manager", "alive_supervision": { diff --git a/tests/integration/smoke/smoke.py b/tests/integration/smoke/smoke.py index d82212e50..b1109a2ca 100644 --- a/tests/integration/smoke/smoke.py +++ b/tests/integration/smoke/smoke.py @@ -41,4 +41,4 @@ def test_smoke(target, setup_test, assert_test_results, remote_test_dir): timeout_s=3.0, ) - assert_test_results({"mock_control_daemon.xml", "gtest_process.xml"}) + assert_test_results({"control_client_test_driver.xml", "gtest_process.xml"}) diff --git a/tests/integration/switch_run_target/BUILD b/tests/integration/switch_run_target/BUILD index d86ebb3e1..f1bdb9301 100644 --- a/tests/integration/switch_run_target/BUILD +++ b/tests/integration/switch_run_target/BUILD @@ -20,8 +20,8 @@ cc_library( ) cc_binary( - name = "control_client_mock", - srcs = ["mock_control_client.cpp"], + name = "control_client_test_driver", + srcs = ["control_client_test_driver.cpp"], deps = [ ":switch_run_target_common", "//score/launch_manager:control_cc", @@ -75,7 +75,7 @@ integration_test( ":component_b", ":component_d", ":component_e", - ":control_client_mock", + ":control_client_test_driver", "//score/launch_manager", ], config = ":switch_run_target.json", diff --git a/tests/integration/switch_run_target/mock_control_client.cpp b/tests/integration/switch_run_target/control_client_test_driver.cpp similarity index 100% rename from tests/integration/switch_run_target/mock_control_client.cpp rename to tests/integration/switch_run_target/control_client_test_driver.cpp diff --git a/tests/integration/switch_run_target/switch_run_target.json b/tests/integration/switch_run_target/switch_run_target.json index f27c94c50..1dd1ce0bd 100644 --- a/tests/integration/switch_run_target/switch_run_target.json +++ b/tests/integration/switch_run_target/switch_run_target.json @@ -22,7 +22,7 @@ "components": { "component_initial": { "component_properties": { - "binary_name": "control_client_mock", + "binary_name": "control_client_test_driver", "application_profile": { "application_type": "State_Manager", "alive_supervision": { @@ -34,7 +34,7 @@ "ready_timeout": 1.0, "shutdown_timeout": 1.0, "environmental_variables": { - "PROCESSIDENTIFIER": "control_client_mock" + "PROCESSIDENTIFIER": "control_client_test_driver" } } }, diff --git a/tests/integration/switch_run_target/switch_run_target.py b/tests/integration/switch_run_target/switch_run_target.py index b13a250be..8a906c0de 100644 --- a/tests/integration/switch_run_target/switch_run_target.py +++ b/tests/integration/switch_run_target/switch_run_target.py @@ -51,7 +51,7 @@ def test_switch_run_target(target, setup_test, assert_test_results, remote_test_ # Process E never starts assert_test_results( { - "mock_control_client.xml", + "control_client_test_driver.xml", "component_a.xml", "component_b.xml", "component_d.xml",