1111from ln_test import LNTest
1212from test_base import TestBase
1313
14- from warnet .k8s import download , get_pods_with_label , pod_log , wait_for_pod
14+ from warnet .constants import LIGHTNING_MISSION
15+ from warnet .k8s import download , get_mission , pod_log , wait_for_pod
1516from warnet .process import run_command
1617
17- lightning_selector = "mission=lightning"
18-
1918
2019class SimLNTest (LNTest , TestBase ):
2120 def __init__ (self ):
@@ -49,11 +48,11 @@ def init_directory(self):
4948
5049 def copy_results (self ):
5150 self .log .info ("Copying results" )
52- pod = get_pods_with_label ( " mission=simln " )[0 ]
51+ pod = get_mission ( f" { self . simln_exec } mission" )[0 ]
5352 self .wait_for_gossip_sync (2 )
5453 wait_for_pod (pod .metadata .name , 60 )
5554
56- log_resp = pod_log (pod .metadata .name , "simln " )
55+ log_resp = pod_log (pod .metadata .name , f" { self . simln_exec } primary-container " )
5756 self .log .info (log_resp .data .decode ("utf-8" ))
5857
5958 partial_func = partial (self .found_results_remotely , pod .metadata .name )
@@ -78,7 +77,7 @@ def wait_for_gossip_sync(self, expected: int):
7877 current = 0
7978 while current < expected :
8079 current = 0
81- pods = get_pods_with_label ( lightning_selector )
80+ pods = get_mission ( LIGHTNING_MISSION )
8281 for v1_pod in pods :
8382 node = v1_pod .metadata .name
8483 chs = json .loads (run_command (f"warnet ln rpc { node } describegraph" ))["edges" ]
0 commit comments