Skip to content

Commit 335aff1

Browse files
committed
cleaning the code as per copilot review comments
1 parent 6324792 commit 335aff1

7 files changed

Lines changed: 347 additions & 476 deletions

File tree

feature_integration_tests/LIFECYCLE_TESTS_SUMMARY.md

Lines changed: 338 additions & 160 deletions
Large diffs are not rendered by default.

feature_integration_tests/README_FIT_LIFECYCLE.md

Lines changed: 0 additions & 292 deletions
This file was deleted.

feature_integration_tests/test_cases/lifecycle_scenario.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def create_launch_manager_config(config_path: Path, components: dict[str, Any],
9191
},
9292
"components": components,
9393
"run_targets": run_targets,
94-
"initial_run_target": "Startup",
94+
"initial_run_target": "startup",
9595
"fallback_run_target": {
9696
"description": "Fallback state",
9797
"depends_on": [],

feature_integration_tests/test_cases/tests/lifecycle/test_run_targets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def test_run_target_switch(self, results: ScenarioResult, logs_info_level: LogCo
9696
if version == "cpp":
9797
assert "Switching from startup to running" in results.stdout, "Run target switch failed"
9898
else:
99-
switch_logs = logs_info_level.get_logs(field="message", pattern="Switching from startup to running")
99+
switch_logs = logs_info_level.get_logs(field="message", pattern="Switching run targets")
100100
assert len(switch_logs) > 0, "Run target switch failed"
101101

102102
def test_process_state_communication(

feature_integration_tests/test_scenarios/cpp/src/scenarios/lifecycle/launch_manager_support.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ class ProcessLaunchingSupport : public Scenario {
9999

100100
// Attempt to report execution state - this demonstrates the API usage
101101
// Note: This requires a running Launch Manager daemon to succeed
102+
std::cout << "Lifecycle client API called" << std::endl;
102103
LifecycleClient client{};
103104
auto result = client.ReportExecutionState(ExecutionState::kRunning);
104105

105106
if (result.has_value()) {
106107
std::cout << "Successfully reported execution state as running" << std::endl;
107108
} else {
108109
// In a test environment without Launch Manager, this is expected
109-
std::cout << "Lifecycle client API called (Launch Manager not available in test env)"
110-
<< std::endl;
110+
std::cout << "Launch Manager not available in test env" << std::endl;
111111
std::cout << "In production, this would report state to Launch Manager" << std::endl;
112112
}
113113

feature_integration_tests/test_scenarios/cpp/src/scenarios/mod.cpp

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
#include <scenario.hpp>
1515

16+
#include "scenarios/lifecycle/launch_manager_support.h"
17+
1618
#include <vector>
1719

1820
Scenario::Ptr make_multiple_kvs_per_app_scenario();
@@ -24,24 +26,6 @@ Scenario::Ptr make_multi_instance_isolation_scenario();
2426
ScenarioGroup::Ptr supported_datatypes_group();
2527
ScenarioGroup::Ptr default_values_group();
2628

27-
Scenario::Ptr make_process_launching_support_scenario();
28-
Scenario::Ptr make_dependency_ordering_scenario();
29-
Scenario::Ptr make_parallel_launching_scenario();
30-
Scenario::Ptr make_control_interface_support_scenario();
31-
Scenario::Ptr make_process_arguments_scenario();
32-
Scenario::Ptr make_process_security_scenario();
33-
Scenario::Ptr make_process_resources_scenario();
34-
Scenario::Ptr make_conditional_launching_scenario();
35-
Scenario::Ptr make_process_management_scenario();
36-
Scenario::Ptr make_run_targets_scenario();
37-
Scenario::Ptr make_process_termination_scenario();
38-
Scenario::Ptr make_monitoring_and_recovery_scenario();
39-
Scenario::Ptr make_control_interface_commands_scenario();
40-
Scenario::Ptr make_logging_support_scenario();
41-
Scenario::Ptr make_configuration_management_scenario();
42-
Scenario::Ptr make_debug_and_terminal_scenario();
43-
Scenario::Ptr make_io_and_file_descriptors_scenario();
44-
4529

4630
ScenarioGroup::Ptr persistency_scenario_group() {
4731
return std::make_shared<ScenarioGroupImpl>(

feature_integration_tests/test_scenarios/rust/src/scenarios/lifecycle/launch_manager_support.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ impl Scenario for ProcessLaunchingSupport {
5656

5757
// Attempt to report execution state - this demonstrates the API usage
5858
// Note: This requires a running Launch Manager daemon to succeed
59+
info!("Lifecycle client API called");
5960
let result = lifecycle_client_rs::report_execution_state_running();
6061

6162
if result {
6263
info!("Successfully reported execution state as running");
6364
} else {
6465
// In a test environment without Launch Manager, this is expected
65-
info!("Lifecycle client API called (Launch Manager not available in test env)");
66+
info!("Launch Manager not available in test env");
6667
info!("In production, this would report state to Launch Manager");
6768
}
6869

@@ -401,7 +402,7 @@ impl Scenario for RunTargets {
401402
}
402403

403404
info!("Starting run target: {}", initial_target);
404-
info!("Switching from startup to running");
405+
info!("Switching run targets");
405406
info!("Process state reported");
406407

407408
Ok(())

0 commit comments

Comments
 (0)