11
11
from ln_test import LNTest
12
12
from test_base import TestBase
13
13
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
15
16
from warnet .process import run_command
16
17
17
- lightning_selector = "mission=lightning"
18
-
19
18
20
19
class SimLNTest (LNTest , TestBase ):
21
20
def __init__ (self ):
@@ -49,11 +48,11 @@ def init_directory(self):
49
48
50
49
def copy_results (self ):
51
50
self .log .info ("Copying results" )
52
- pod = get_pods_with_label ( " mission=simln " )[0 ]
51
+ pod = get_mission ( f" { self . simln_exec } mission" )[0 ]
53
52
self .wait_for_gossip_sync (2 )
54
53
wait_for_pod (pod .metadata .name , 60 )
55
54
56
- log_resp = pod_log (pod .metadata .name , "simln " )
55
+ log_resp = pod_log (pod .metadata .name , f" { self . simln_exec } primary-container " )
57
56
self .log .info (log_resp .data .decode ("utf-8" ))
58
57
59
58
partial_func = partial (self .found_results_remotely , pod .metadata .name )
@@ -78,7 +77,7 @@ def wait_for_gossip_sync(self, expected: int):
78
77
current = 0
79
78
while current < expected :
80
79
current = 0
81
- pods = get_pods_with_label ( lightning_selector )
80
+ pods = get_mission ( LIGHTNING_MISSION )
82
81
for v1_pod in pods :
83
82
node = v1_pod .metadata .name
84
83
chs = json .loads (run_command (f"warnet ln rpc { node } describegraph" ))["edges" ]
0 commit comments