From 5591edc5358c88a8ff947831fdc03b5949f09bee Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 17 Mar 2021 20:52:26 +0100 Subject: smoketest: static: add required vrf to setUp() When we leak routes to a VRF it is verified that the target VRF actually exists. --- smoketest/scripts/cli/test_protocols_static.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'smoketest/scripts/cli') diff --git a/smoketest/scripts/cli/test_protocols_static.py b/smoketest/scripts/cli/test_protocols_static.py index 407734fcb..75d3e6a42 100755 --- a/smoketest/scripts/cli/test_protocols_static.py +++ b/smoketest/scripts/cli/test_protocols_static.py @@ -83,6 +83,10 @@ routes = { tables = ['80', '81', '82'] class StaticRouteTest(VyOSUnitTestSHIM.TestCase): + def setUp(self): + # This is our "target" VRF when leaking routes: + self.cli_set(['vrf', 'name', 'black', 'table', '43210']) + def tearDown(self): for route, route_config in routes.items(): route_type = 'route' @@ -94,8 +98,6 @@ class StaticRouteTest(VyOSUnitTestSHIM.TestCase): self.cli_delete(base_path + ['table', table]) tmp = self.getFRRconfig('', end='') - import pprint - pprint.pprint(tmp) self.cli_commit() def test_protocols_static(self): @@ -288,7 +290,6 @@ class StaticRouteTest(VyOSUnitTestSHIM.TestCase): 'green' : { 'table' : '2000' }, 'blue' : { 'table' : '3000' }, } - self.debug = True for vrf, vrf_config in vrfs.items(): vrf_base_path = ['vrf', 'name', vrf] -- cgit v1.2.3