diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-08-15 14:56:45 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-08-15 14:56:45 +0200 |
commit | 555513691f79db537a8c7430e87e846e8607ef5e (patch) | |
tree | 36b4350419104d84e4a5240879fbce82227ce18b /smoketest | |
parent | ae1994f1452377bf523973f2048b52590bcbad8b (diff) | |
download | vyos-1x-555513691f79db537a8c7430e87e846e8607ef5e.tar.gz vyos-1x-555513691f79db537a8c7430e87e846e8607ef5e.zip |
smoketest: ospf: add debug code for redistribution test
Diffstat (limited to 'smoketest')
-rwxr-xr-x | smoketest/scripts/cli/test_protocols_ospf.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/smoketest/scripts/cli/test_protocols_ospf.py b/smoketest/scripts/cli/test_protocols_ospf.py index 2ec0005bf..f132fc5b5 100755 --- a/smoketest/scripts/cli/test_protocols_ospf.py +++ b/smoketest/scripts/cli/test_protocols_ospf.py @@ -229,13 +229,19 @@ class TestProtocolsOSPF(VyOSUnitTestSHIM.TestCase): # Verify FRR ospfd configuration frrconfig = self.getFRRconfig('router ospf') - self.assertIn(f'router ospf', frrconfig) - for protocol in redistribute: - if protocol in ['kernel', 'static']: - self.assertIn(f' redistribute {protocol} metric {metric} route-map {route_map}', frrconfig) - else: - self.assertIn(f' redistribute {protocol} metric {metric} metric-type {metric_type} route-map {route_map}', frrconfig) - + try: + self.assertIn(f'router ospf', frrconfig) + for protocol in redistribute: + if protocol in ['kernel', 'static']: + self.assertIn(f' redistribute {protocol} metric {metric} route-map {route_map}', frrconfig) + else: + self.assertIn(f' redistribute {protocol} metric {metric} metric-type {metric_type} route-map {route_map}', frrconfig) + except: + log.debug(frrconfig) + log.debug(cmd('sudo dmesg')) + log.debug(cmd('sudo cat /var/log/messages')) + log.debug(cmd('vtysh -c "show run"')) + self.fail('Now we can hopefully see why OSPF fails!') def test_ospf_09_virtual_link(self): networks = ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16'] |