File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -412,6 +412,7 @@ def scenarios_list_running(self) -> list[dict]:
412412 "pid" : sc ["pid" ],
413413 "cmd" : sc ["cmd" ],
414414 "active" : sc ["proc" ].poll () is None ,
415+ "return_code" : sc ["proc" ].returncode ,
415416 "network" : sc ["network" ],
416417 }
417418 for sc in self .running_scenarios
Original file line number Diff line number Diff line change @@ -43,6 +43,9 @@ def run_ln_init_scenario(self):
4343 self .warcli ("rpc 0 getblockcount" )
4444 self .warcli ("scenarios run ln_init" )
4545 self .wait_for_all_scenarios ()
46+ scenario_return_code = self .get_scenario_return_code ("ln_init" )
47+ if scenario_return_code != 0 :
48+ raise Exception ("LN Init scenario failed" )
4649
4750 def test_channel_policies (self ):
4851 self .log .info ("Ensuring node-level channel policy settings" )
Original file line number Diff line number Diff line change @@ -169,3 +169,10 @@ def check_scenarios():
169169 return all (not scn ["active" ] for scn in scns )
170170
171171 self .wait_for_predicate (check_scenarios )
172+
173+ def get_scenario_return_code (self , scenario_name ):
174+ scns = self .rpc ("scenarios_list_running" )
175+ scns = [scn for scn in scns if scn ["cmd" ].strip () == scenario_name ]
176+ if len (scns ) == 0 :
177+ raise Exception (f"Scenario { scenario_name } not found in running scenarios" )
178+ return scns [0 ]["return_code" ]
You can’t perform that action at this time.
0 commit comments