summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-25 21:05:28 +0200
committerChristian Poessinger <christian@poessinger.com>2021-06-25 21:05:28 +0200
commit05a7114a4a9713521faed4145a8bf0f4c35020bb (patch)
tree36132e84c7d7db2bc3aa8c13463f509c2ae556a5 /smoketest/scripts/cli
parent6b7b19c93f90839549dd668116c4da2f38cfdc66 (diff)
downloadvyos-1x-05a7114a4a9713521faed4145a8bf0f4c35020bb.tar.gz
vyos-1x-05a7114a4a9713521faed4145a8bf0f4c35020bb.zip
smoketest: ospf: sometimes the passive-interface-test fails - add debug code
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_ospf.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/smoketest/scripts/cli/test_protocols_ospf.py b/smoketest/scripts/cli/test_protocols_ospf.py
index 7ff909e33..23e5f2678 100755
--- a/smoketest/scripts/cli/test_protocols_ospf.py
+++ b/smoketest/scripts/cli/test_protocols_ospf.py
@@ -20,6 +20,7 @@ from base_vyostest_shim import VyOSUnitTestSHIM
from vyos.ifconfig import Section
from vyos.util import process_named_running
+from vyos.util import cmd
PROCESS_NAME = 'ospfd'
base_path = ['protocols', 'ospf']
@@ -195,11 +196,17 @@ class TestProtocolsOSPF(VyOSUnitTestSHIM.TestCase):
# Verify FRR ospfd configuration
frrconfig = self.getFRRconfig('router ospf')
- self.assertIn(f'router ospf', frrconfig)
- self.assertIn(f' passive-interface default', frrconfig) # default
- for interface in interfaces:
- self.assertIn(f' no passive-interface {interface}', frrconfig) # default
-
+ try:
+ self.assertIn(f'router ospf', frrconfig)
+ self.assertIn(f' passive-interface default', frrconfig) # default
+ for interface in interfaces:
+ self.assertIn(f' no passive-interface {interface}', frrconfig) # default
+ except:
+ tmp = cmd('tail -n 250 /var/log/messages')
+ print(tmp)
+ tmp = cmd('vtysh -c "show run"')
+ print(tmp)
+ self.fail('Now we can hopefully see why OSPF fails')
def test_ospf_08_redistribute(self):
metric = '15'