summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_protocols_ospf.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-12-26 11:06:44 +0100
committerChristian Poessinger <christian@poessinger.com>2021-12-26 11:07:21 +0100
commita455cdcb06d527d43cbd2979eb2c646597d88ae6 (patch)
treeaac57eb6aeb72d06095856845963590d9cec36d7 /smoketest/scripts/cli/test_protocols_ospf.py
parent5e726063ebf090ed9778c2db9b02f013c53ed714 (diff)
downloadvyos-1x-a455cdcb06d527d43cbd2979eb2c646597d88ae6.tar.gz
vyos-1x-a455cdcb06d527d43cbd2979eb2c646597d88ae6.zip
smoketest: ospf: use setUpClass()/tearDownClass() for route-maps
Diffstat (limited to 'smoketest/scripts/cli/test_protocols_ospf.py')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_ospf.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_protocols_ospf.py b/smoketest/scripts/cli/test_protocols_ospf.py
index 9308fe20f..ee58b0fe2 100755
--- a/smoketest/scripts/cli/test_protocols_ospf.py
+++ b/smoketest/scripts/cli/test_protocols_ospf.py
@@ -33,14 +33,21 @@ route_map = 'foo-bar-baz10'
log = logging.getLogger('TestProtocolsOSPF')
class TestProtocolsOSPF(VyOSUnitTestSHIM.TestCase):
- def setUp(self):
- self.cli_set(['policy', 'route-map', route_map, 'rule', '10', 'action', 'permit'])
- self.cli_set(['policy', 'route-map', route_map, 'rule', '20', 'action', 'permit'])
+ @classmethod
+ def setUpClass(cls):
+ super(cls, cls).setUpClass()
+
+ cls.cli_set(cls, ['policy', 'route-map', route_map, 'rule', '10', 'action', 'permit'])
+ cls.cli_set(cls, ['policy', 'route-map', route_map, 'rule', '20', 'action', 'permit'])
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.cli_delete(cls, ['policy', 'route-map', route_map])
+ super(cls, cls).tearDownClass()
def tearDown(self):
# Check for running process
self.assertTrue(process_named_running(PROCESS_NAME))
- self.cli_delete(['policy', 'route-map', route_map])
self.cli_delete(base_path)
self.cli_commit()