diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-04-09 09:27:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-09 09:27:26 +0200 |
commit | 1085195a2c29ef608bbc8cdf1cb172a9b1fe2530 (patch) | |
tree | 2ed3276b29d34baa3fe1b53c3d207afbc2081ca2 /smoketest/scripts | |
parent | 6f6f45c57eef40ffe309f66865373d520e50b25d (diff) | |
parent | c87376d1ff8919bd368af19f5b61b62e85ac2e9a (diff) | |
download | vyos-1x-1085195a2c29ef608bbc8cdf1cb172a9b1fe2530.tar.gz vyos-1x-1085195a2c29ef608bbc8cdf1cb172a9b1fe2530.zip |
Merge pull request #800 from c-po/ospf-support-hyphen
protocols: fix "bad" design and non working route-maps containing hyphens
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-x | smoketest/scripts/cli/test_protocols_bgp.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py index 4f39948c0..8f0856f91 100755 --- a/smoketest/scripts/cli/test_protocols_bgp.py +++ b/smoketest/scripts/cli/test_protocols_bgp.py @@ -142,6 +142,8 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): self.cli_set(['policy', 'prefix-list6', prefix_list_out6, 'rule', '10', 'action', 'deny']) self.cli_set(['policy', 'prefix-list6', prefix_list_out6, 'rule', '10', 'prefix', '2001:db8:2000::/64']) + self.cli_set(base_path + ['local-as', ASN]) + def tearDown(self): self.cli_delete(['policy', 'route-map', route_map_in]) self.cli_delete(['policy', 'route-map', route_map_out]) @@ -214,7 +216,9 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): self.cli_set(base_path + ['parameters', 'router-id', router_id]) self.cli_set(base_path + ['parameters', 'log-neighbor-changes']) - # Local AS number MUST be defined + # Local AS number MUST be defined - as this is set in setUp() we remove + # this once for testing of the proper error + self.cli_delete(base_path + ['local-as']) with self.assertRaises(ConfigSessionError): self.cli_commit() self.cli_set(base_path + ['local-as', ASN]) @@ -257,7 +261,6 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): def test_bgp_02_neighbors(self): - self.cli_set(base_path + ['local-as', ASN]) # Test out individual neighbor configuration items, not all of them are # also available to a peer-group! for peer, peer_config in neighbor_config.items(): @@ -332,7 +335,6 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): self.verify_frr_config(peer, peer_config, frrconfig) def test_bgp_03_peer_groups(self): - self.cli_set(base_path + ['local-as', ASN]) # Test out individual peer-group configuration items for peer_group, config in peer_group_config.items(): if 'cap_dynamic' in config: @@ -403,8 +405,6 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): }, } - self.cli_set(base_path + ['local-as', ASN]) - # We want to redistribute ... redistributes = ['connected', 'isis', 'kernel', 'ospf', 'rip', 'static'] for redistribute in redistributes: @@ -451,8 +451,6 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): }, } - self.cli_set(base_path + ['local-as', ASN]) - # We want to redistribute ... redistributes = ['connected', 'kernel', 'ospfv3', 'ripng', 'static'] for redistribute in redistributes: @@ -495,7 +493,6 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): listen_ranges = ['192.0.2.0/25', '192.0.2.128/25'] peer_group = 'listenfoobar' - self.cli_set(base_path + ['local-as', ASN]) self.cli_set(base_path + ['listen', 'limit', limit]) for prefix in listen_ranges: @@ -527,8 +524,6 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): vnis = ['10010', '10020', '10030'] neighbors = ['192.0.2.10', '192.0.2.20', '192.0.2.30'] - self.cli_set(base_path + ['local-as', ASN]) - self.cli_set(base_path + ['address-family', 'l2vpn-evpn', 'advertise-all-vni']) self.cli_set(base_path + ['address-family', 'l2vpn-evpn', 'advertise-default-gw']) self.cli_set(base_path + ['address-family', 'l2vpn-evpn', 'advertise-svi-ip']) |