summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-29 16:01:00 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-29 16:01:00 +0100
commit2d6cf410aeb1fc6e9e7f7eebdc7e5853ad91961c (patch)
treef8489c73515f8ad79cc9380e0a9dbabb3a686c2b /smoketest/scripts/cli
parent49096fd098fc2f2ed9891026da5d6956ad137783 (diff)
downloadvyos-1x-2d6cf410aeb1fc6e9e7f7eebdc7e5853ad91961c.tar.gz
vyos-1x-2d6cf410aeb1fc6e9e7f7eebdc7e5853ad91961c.zip
smoketest: ospf: merge area and virtual-link testcases
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_ospf.py22
1 files changed, 5 insertions, 17 deletions
diff --git a/smoketest/scripts/cli/test_protocols_ospf.py b/smoketest/scripts/cli/test_protocols_ospf.py
index d47838d8c..d93e87945 100755
--- a/smoketest/scripts/cli/test_protocols_ospf.py
+++ b/smoketest/scripts/cli/test_protocols_ospf.py
@@ -232,24 +232,8 @@ class TestProtocolsOSPF(unittest.TestCase):
else:
self.assertIn(f' redistribute {protocol} metric {metric} metric-type {metric_type} route-map {route_map}', frrconfig)
-
- def test_ospf_09_area(self):
- area = '0'
+ def test_ospf_09_virtual_link(self):
networks = ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16']
- for network in networks:
- self.session.set(base_path + ['area', area, 'network', network])
-
- # commit changes
- self.session.commit()
-
- # Verify FRR ospfd configuration
- frrconfig = getFRROSPFconfig()
- self.assertIn(f'router ospf', frrconfig)
- for network in networks:
- self.assertIn(f' network {network} area {area}', frrconfig)
-
-
- def test_ospf_10_virtual_link(self):
area = '10'
shortcut = 'enable'
virtual_link = '192.0.2.1'
@@ -263,6 +247,8 @@ class TestProtocolsOSPF(unittest.TestCase):
self.session.set(base_path + ['area', area, 'virtual-link', virtual_link, 'retransmit-interval', retransmit])
self.session.set(base_path + ['area', area, 'virtual-link', virtual_link, 'transmit-delay', transmit])
self.session.set(base_path + ['area', area, 'virtual-link', virtual_link, 'dead-interval', dead])
+ for network in networks:
+ self.session.set(base_path + ['area', area, 'network', network])
# commit changes
self.session.commit()
@@ -272,6 +258,8 @@ class TestProtocolsOSPF(unittest.TestCase):
self.assertIn(f'router ospf', frrconfig)
self.assertIn(f' area {area} shortcut {shortcut}', frrconfig)
self.assertIn(f' area {area} virtual-link {virtual_link} hello-interval {hello} retransmit-interval {retransmit} transmit-delay {transmit} dead-interval {dead}', frrconfig)
+ for network in networks:
+ self.assertIn(f' network {network} area {area}', frrconfig)
if __name__ == '__main__':
unittest.main(verbosity=2)