summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_policy_route.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-10-07 17:22:17 +0200
committerGitHub <noreply@github.com>2024-10-07 17:22:17 +0200
commite8c65fafc1ea5c8682b717302a876fcff2067f3d (patch)
tree804002269ae2dcfa2f0225ded4bc473f6c6d8a58 /smoketest/scripts/cli/test_policy_route.py
parent09a4b463bf1c4b87832039f2c1d868a6c1d9c4f9 (diff)
parent9c291d115d987cc635d1ef56898119c7d2bdfee6 (diff)
downloadvyos-1x-e8c65fafc1ea5c8682b717302a876fcff2067f3d.tar.gz
vyos-1x-e8c65fafc1ea5c8682b717302a876fcff2067f3d.zip
Merge pull request #3938 from talmakion/feature/T6430-local-pbr
pbr: T6430: Local IP rules targeting VRFs by name as well as route table IDs
Diffstat (limited to 'smoketest/scripts/cli/test_policy_route.py')
-rwxr-xr-xsmoketest/scripts/cli/test_policy_route.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/smoketest/scripts/cli/test_policy_route.py b/smoketest/scripts/cli/test_policy_route.py
index 797ab9770..672865eb0 100755
--- a/smoketest/scripts/cli/test_policy_route.py
+++ b/smoketest/scripts/cli/test_policy_route.py
@@ -18,8 +18,6 @@ import unittest
from base_vyostest_shim import VyOSUnitTestSHIM
-from vyos.utils.process import cmd
-
mark = '100'
conn_mark = '555'
conn_mark_set = '111'
@@ -41,7 +39,7 @@ class TestPolicyRoute(VyOSUnitTestSHIM.TestCase):
cls.cli_set(cls, ['interfaces', 'ethernet', interface, 'address', interface_ip])
cls.cli_set(cls, ['protocols', 'static', 'table', table_id, 'route', '0.0.0.0/0', 'interface', interface])
-
+
cls.cli_set(cls, ['vrf', 'name', vrf, 'table', vrf_table_id])
@classmethod
@@ -73,17 +71,6 @@ class TestPolicyRoute(VyOSUnitTestSHIM.TestCase):
self.verify_rules(ip_rule_search, inverse=True)
- def verify_rules(self, rules_search, inverse=False):
- rule_output = cmd('ip rule show')
-
- for search in rules_search:
- matched = False
- for line in rule_output.split("\n"):
- if all(item in line for item in search):
- matched = True
- break
- self.assertTrue(not matched if inverse else matched, msg=search)
-
def test_pbr_group(self):
self.cli_set(['firewall', 'group', 'network-group', 'smoketest_network', 'network', '172.16.99.0/24'])
self.cli_set(['firewall', 'group', 'network-group', 'smoketest_network1', 'network', '172.16.101.0/24'])