summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-12-12 21:07:10 +0100
committerChristian Breunig <christian@breunig.cc>2024-12-16 22:24:50 +0100
commit176f974d1c50aae44ec985467aa37f01ca6e0169 (patch)
treeac020732c60de709c25fc6b202be98e48730ce7b
parentd58e7ace7075e24c64cfe5e56ffcaad1688446e9 (diff)
downloadvyos-1x-176f974d1c50aae44ec985467aa37f01ca6e0169.tar.gz
vyos-1x-176f974d1c50aae44ec985467aa37f01ca6e0169.zip
smoketest: T6746: add 2 second guard timer for getFRRconfig()
Sometimes FRR needs some time after reloading the configuration to appear in vtysh. This is a workaround addiung a 2 second guard timer.
-rw-r--r--smoketest/scripts/cli/base_vyostest_shim.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/base_vyostest_shim.py b/smoketest/scripts/cli/base_vyostest_shim.py
index a383e596c..affa53877 100644
--- a/smoketest/scripts/cli/base_vyostest_shim.py
+++ b/smoketest/scripts/cli/base_vyostest_shim.py
@@ -103,6 +103,9 @@ class VyOSUnitTestSHIM:
def getFRRconfig(self, string=None, end='$', endsection='^!', daemon=''):
""" Retrieve current "running configuration" from FRR """
+ # Sometimes FRR needs some time after reloading the configuration to
+ # appear in vtysh. This is a workaround addiung a 2 seconds guard timer
+ sleep(2)
command = f'vtysh -c "show run {daemon} no-header"'
if string: command += f' | sed -n "/^{string}{end}/,/{endsection}/p"'
out = cmd(command)