summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-19 06:59:48 +0100
committerChristian Breunig <christian@breunig.cc>2023-12-19 15:48:28 +0100
commitc0fbfe8aea4ca0cc5c39638db8e58f648c662b3c (patch)
tree67d7dad1d85e6866d66a35a2108b070b26f20ad0 /smoketest/scripts/cli
parent5b0c7bbf8c82a0e68462e035add6a3c9da988b29 (diff)
downloadvyos-1x-c0fbfe8aea4ca0cc5c39638db8e58f648c662b3c.tar.gz
vyos-1x-c0fbfe8aea4ca0cc5c39638db8e58f648c662b3c.zip
smoketest: bgp: T4163: use explicit kill to respawn bgpd process
(cherry picked from commit b873112dd7253b64d323e183758dbabaa0f28b6e)
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bgp.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py
index 4697d4970..ebc9eeaaa 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -16,7 +16,6 @@
import unittest
-from subprocess import run
from time import sleep
from base_vyostest_shim import VyOSUnitTestSHIM
@@ -25,6 +24,7 @@ from vyos.ifconfig import Section
from vyos.configsession import ConfigSessionError
from vyos.template import is_ipv6
from vyos.utils.process import process_named_running
+from vyos.utils.process import cmd
PROCESS_NAME = 'bgpd'
ASN = '64512'
@@ -1162,11 +1162,9 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
mirror_buffer = '32000000'
bmp_path = base_path + ['bmp']
target_path = bmp_path + ['target', target_name]
- command = ['/opt/vyatta/bin/vyatta-op-cmd-wrapper', 'restart', 'bgp']
+ # by default the 'bmp' module not loaded for the bgpd expect Error
self.cli_set(bmp_path)
- # by default the 'bmp' module not loaded for the bgpd
- # expect Error
if not process_named_running('bgpd', 'bmp'):
with self.assertRaises(ConfigSessionError):
self.cli_commit()
@@ -1177,7 +1175,7 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
self.cli_commit()
# restart bgpd to apply "-M bmp" and update PID
- run(command, input='Y', text=True)
+ cmd(f'sudo kill -9 {self.daemon_pid}')
# let the bgpd process recover
sleep(10)
# update daemon PID - this was a planned daemon restart