@@ -164,8 +164,8 @@ def _wait_until(predicate, timeout_s: float, interval_s: float = 0.2) -> bool:
164164
165165 @add_test_properties (
166166 partially_verifies = ["feat_req__lifecycle__parallel_launch_support" ],
167- test_type = "integration " ,
168- derivation_technique = "end-to-end-testing " ,
167+ test_type = "requirements-based " ,
168+ derivation_technique = "requirements-analysis " ,
169169 )
170170 def test_startup_declares_and_launches_multiple_processes (
171171 self ,
@@ -195,8 +195,8 @@ def test_startup_declares_and_launches_multiple_processes(
195195
196196 @add_test_properties (
197197 partially_verifies = ["feat_req__lifecycle__process_launch_args" ],
198- test_type = "integration " ,
199- derivation_technique = "end-to-end-testing " ,
198+ test_type = "requirements-based " ,
199+ derivation_technique = "requirements-analysis " ,
200200 )
201201 def test_launch_process_arguments_are_applied (
202202 self ,
@@ -236,33 +236,41 @@ def test_launch_process_environment_is_applied(
236236 launch_manager_daemon : dict [str , Any ],
237237 version : str ,
238238 ) -> None :
239- """Verify launched process environment contains configured identifiers."""
239+ """Verify launched process environment matches every configured environment variable.
240+
241+ Reads the expected variables from the config itself (rather than hardcoded
242+ literals) so this test tracks config drift instead of only ever re-checking
243+ values that happen to coincide with the app name.
244+ """
240245 daemon_info = launch_manager_daemon
241246 app_name = "rust_supervised_app" if version == "rust" else "cpp_supervised_app"
242247 app_path = str (daemon_info ["apps" ][version ])
243248
249+ config_path = Path (__file__ ).resolve ().parents [3 ] / "configs" / "lifecycle_daemon_config.json"
250+ config = json .loads (config_path .read_text (encoding = "utf-8" ))
251+ configured_env = config ["components" ][app_name ]["deployment_config" ]["environmental_variables" ]
252+ assert configured_env , f"{ app_name } does not configure any environmental_variables to verify against"
253+
244254 started = self ._wait_until (lambda : self ._is_running (app_path ), timeout_s = 8.0 )
245255 assert started , f"{ app_name } was not launched before environment verification"
246256
247257 pid = self ._first_pid (app_path )
248258 assert pid is not None , f"Could not resolve PID for { app_name } "
249259 proc_env = self ._proc_environ (pid )
250260
251- assert proc_env .get ("PROCESSIDENTIFIER" ) == app_name , (
252- f"PROCESSIDENTIFIER mismatch for { app_name } : { proc_env .get ('PROCESSIDENTIFIER' )} "
253- )
254- assert proc_env .get ("IDENTIFIER" ) == app_name , (
255- f"IDENTIFIER mismatch for { app_name } : { proc_env .get ('IDENTIFIER' )} "
256- )
261+ for key , expected_value in configured_env .items ():
262+ assert proc_env .get (key ) == expected_value , (
263+ f"{ key } mismatch for { app_name } : expected { expected_value !r} , got { proc_env .get (key )!r} "
264+ )
257265
258266 @add_test_properties (
259267 partially_verifies = [
260268 "feat_req__lifecycle__uid_gid_support" ,
261269 "feat_req__lifecycle__launch_priority_support" ,
262270 "feat_req__lifecycle__scheduling_policy" ,
263271 ],
264- test_type = "integration " ,
265- derivation_technique = "end-to-end-testing " ,
272+ test_type = "requirements-based " ,
273+ derivation_technique = "requirements-analysis " ,
266274 )
267275 def test_config_defines_uid_gid_scheduling_and_priority (
268276 self , launch_manager_daemon : dict [str , Any ], version : str
@@ -279,8 +287,8 @@ def test_config_defines_uid_gid_scheduling_and_priority(
279287
280288 @add_test_properties (
281289 partially_verifies = ["feat_req__lifecycle__uid_gid_support" ],
282- test_type = "integration " ,
283- derivation_technique = "end-to-end-testing " ,
290+ test_type = "requirements-based " ,
291+ derivation_technique = "requirements-analysis " ,
284292 )
285293 def test_launched_process_uid_gid_matches_config_when_applied (
286294 self ,
@@ -325,8 +333,8 @@ def test_launched_process_uid_gid_matches_config_when_applied(
325333 "feat_req__lifecycle__launch_priority_support" ,
326334 "feat_req__lifecycle__scheduling_policy" ,
327335 ],
328- test_type = "integration " ,
329- derivation_technique = "end-to-end-testing " ,
336+ test_type = "requirements-based " ,
337+ derivation_technique = "requirements-analysis " ,
330338 )
331339 def test_launched_process_scheduling_matches_config_when_applied (
332340 self ,
@@ -381,8 +389,8 @@ def test_launched_process_scheduling_matches_config_when_applied(
381389
382390 @add_test_properties (
383391 partially_verifies = ["feat_req__lifecycle__secpol_non_root" ],
384- test_type = "integration " ,
385- derivation_technique = "end-to-end-testing " ,
392+ test_type = "requirements-based " ,
393+ derivation_technique = "requirements-analysis " ,
386394 )
387395 def test_launch_manager_and_apps_are_not_running_as_root (
388396 self ,
@@ -413,8 +421,8 @@ def test_launch_manager_and_apps_are_not_running_as_root(
413421 "feat_req__lifecycle__monitor_abnormal_term" ,
414422 "feat_req__lifecycle__retries_configurable" ,
415423 ],
416- test_type = "integration " ,
417- derivation_technique = "end-to-end-testing " ,
424+ test_type = "requirements-based " ,
425+ derivation_technique = "requirements-analysis " ,
418426 )
419427 def test_supervised_app_recovery (self , launch_manager_daemon : dict [str , Any ], version : str ) -> None :
420428 """
@@ -456,8 +464,8 @@ def test_supervised_app_recovery(self, launch_manager_daemon: dict[str, Any], ve
456464 "feat_req__lifecycle__liveliness_detection" ,
457465 "feat_req__lifecycle__smart_watchdog_config" ,
458466 ],
459- test_type = "integration " ,
460- derivation_technique = "end-to-end-testing " ,
467+ test_type = "requirements-based " ,
468+ derivation_technique = "requirements-analysis " ,
461469)
462470class TestHealthMonitoringWithDaemon :
463471 """
0 commit comments