diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-05-24 18:42:58 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-05-24 18:42:58 +0200 |
commit | e60d65e02f94deb9741bdd3d7f6621a79bf81fcf (patch) | |
tree | 21b812ed148cb8546dc859b81a667f585753cdc3 /smoketest/scripts/cli | |
parent | 92cad20eb61f76a9b9dc6e25d39fdce7dbf235f3 (diff) | |
download | vyos-1x-e60d65e02f94deb9741bdd3d7f6621a79bf81fcf.tar.gz vyos-1x-e60d65e02f94deb9741bdd3d7f6621a79bf81fcf.zip |
smoketest: isis: T3576: add testcase for default route origination
This is the smoketest for the implementation added in commit 9682337c ("isis:
T3576: support metric and route-map when originating a default route").
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-x | smoketest/scripts/cli/test_protocols_isis.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_protocols_isis.py b/smoketest/scripts/cli/test_protocols_isis.py index bf8b0918c..a5150178a 100755 --- a/smoketest/scripts/cli/test_protocols_isis.py +++ b/smoketest/scripts/cli/test_protocols_isis.py @@ -136,5 +136,28 @@ class TestProtocolsISIS(VyOSUnitTestSHIM.TestCase): self.cli_delete(['policy', 'route-map', route_map]) + def test_isis_04_default_information(self): + metric = '50' + route_map = 'default-foo-' + + self.isis_base_config() + for afi in ['ipv4', 'ipv6']: + for level in ['level-1', 'level-2']: + self.cli_set(base_path + ['default-information', 'originate', afi, level, 'always']) + self.cli_set(base_path + ['default-information', 'originate', afi, level, 'metric', metric]) + self.cli_set(base_path + ['default-information', 'originate', afi, level, 'route-map', route_map + level + afi]) + + # Commit all changes + self.cli_commit() + + # Verify all changes + tmp = self.getFRRconfig(f'router isis {domain}') + self.assertIn(f' net {net}', tmp) + + for afi in ['ipv4', 'ipv6']: + for level in ['level-1', 'level-2']: + route_map_name = route_map + level + afi + self.assertIn(f' default-information originate {afi} {level} always route-map {route_map_name} metric {metric}', tmp) + if __name__ == '__main__': unittest.main(verbosity=2) |