File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 16
16
17
17
import unittest
18
18
19
- from subprocess import run
20
19
from time import sleep
21
20
22
21
from base_vyostest_shim import VyOSUnitTestSHIM
25
24
from vyos .configsession import ConfigSessionError
26
25
from vyos .template import is_ipv6
27
26
from vyos .utils .process import process_named_running
27
+ from vyos .utils .process import cmd
28
28
29
29
PROCESS_NAME = 'bgpd'
30
30
ASN = '64512'
@@ -1162,11 +1162,9 @@ def test_bgp_25_bmp(self):
1162
1162
mirror_buffer = '32000000'
1163
1163
bmp_path = base_path + ['bmp' ]
1164
1164
target_path = bmp_path + ['target' , target_name ]
1165
- command = ['/opt/vyatta/bin/vyatta-op-cmd-wrapper' , 'restart' , 'bgp' ]
1166
1165
1166
+ # by default the 'bmp' module not loaded for the bgpd expect Error
1167
1167
self .cli_set (bmp_path )
1168
- # by default the 'bmp' module not loaded for the bgpd
1169
- # expect Error
1170
1168
if not process_named_running ('bgpd' , 'bmp' ):
1171
1169
with self .assertRaises (ConfigSessionError ):
1172
1170
self .cli_commit ()
@@ -1177,7 +1175,7 @@ def test_bgp_25_bmp(self):
1177
1175
self .cli_commit ()
1178
1176
1179
1177
# restart bgpd to apply "-M bmp" and update PID
1180
- run ( command , input = 'Y' , text = True )
1178
+ cmd ( f'sudo kill -9 { self . daemon_pid } ' )
1181
1179
# let the bgpd process recover
1182
1180
sleep (10 )
1183
1181
# update daemon PID - this was a planned daemon restart
You can’t perform that action at this time.
0 commit comments