summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_protocols_bgp.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-27 08:57:42 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-27 08:57:42 +0100
commitcf8df2f3995d553e87257a6a748905f888d97941 (patch)
tree7166df8a9ee2a1f3fc00b29d0bbb95e85d4baf0d /smoketest/scripts/cli/test_protocols_bgp.py
parent8732ebc46a2daddc6e4dfa05f3f70bf2ac9400af (diff)
downloadvyos-1x-cf8df2f3995d553e87257a6a748905f888d97941.tar.gz
vyos-1x-cf8df2f3995d553e87257a6a748905f888d97941.zip
smoketest: bgp: T2100: fix "simple" testcase for ebgp-requires-policy
Commit 4bf55f97 ("BGP: T2100: Adding RFC8212 option toggle.") added a CLI option to enable RFC8212 ebgp-requires-policy checks. The extended smoketests assumed that this will lead to an FRR configuration line of "bgp ebgp-requires-policy" - which is not the case as this is a default option and FRR hides default options from the config. In order to properly verify this functionality we must conduct the negative test and ensure the option is not present in the CLI at all.
Diffstat (limited to 'smoketest/scripts/cli/test_protocols_bgp.py')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bgp.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py
index 607dfc116..8d42fafc3 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -241,7 +241,7 @@ class TestProtocolsBGP(unittest.TestCase):
self.assertIn(f' no bgp default ipv4-unicast', frrconfig)
self.assertIn(f' bgp graceful-restart stalepath-time {stalepath_time}', frrconfig)
self.assertIn(f' bgp graceful-shutdown', frrconfig)
- self.assertIn(f' bgp ebgp-requires-policy', frrconfig)
+ self.assertNotIn(f'bgp ebgp-requires-policy', frrconfig)
def test_bgp_02_neighbors(self):
@@ -455,6 +455,9 @@ class TestProtocolsBGP(unittest.TestCase):
frrconfig = getFRRBGPconfig()
self.assertIn(f'router bgp {ASN}', frrconfig)
self.assertIn(f' address-family ipv6 unicast', frrconfig)
+ # T2100: By default ebgp-requires-policy is disabled to keep VyOS
+ # 1.3 and 1.2 backwards compatibility
+ self.assertIn(f' no bgp ebgp-requires-policy', frrconfig)
for redistribute in redistributes:
# FRR calls this OSPF6