summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2023-09-28 15:37:22 +0100
committerGitHub <noreply@github.com>2023-09-28 15:37:22 +0100
commit448c140c0717f713e0eeb5d9d9bce3f94da198f6 (patch)
treeeb82e61e1246125b2146babf3848f4342624f50d /smoketest
parent6ffb104ada0af428ee293dc094a8f624725e9bbc (diff)
parent96b8b38a3c17aa08fa964eef9141cf89f1c1d442 (diff)
downloadvyos-1x-448c140c0717f713e0eeb5d9d9bce3f94da198f6.tar.gz
vyos-1x-448c140c0717f713e0eeb5d9d9bce3f94da198f6.zip
Merge pull request #2313 from sever-sever/T5165
T5165: Add option protocol for policy local-route
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_policy.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_policy.py b/smoketest/scripts/cli/test_policy.py
index 354f791bd..e868895ce 100755
--- a/smoketest/scripts/cli/test_policy.py
+++ b/smoketest/scripts/cli/test_policy.py
@@ -1519,6 +1519,28 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase):
self.assertEqual(sort_ip(tmp), sort_ip(original))
+ # Test set table for destination and protocol
+ def test_protocol_destination_table_id(self):
+ path = base_path + ['local-route']
+
+ dst = '203.0.113.12'
+ rule = '85'
+ table = '104'
+ proto = 'tcp'
+
+ self.cli_set(path + ['rule', rule, 'set', 'table', table])
+ self.cli_set(path + ['rule', rule, 'destination', dst])
+ self.cli_set(path + ['rule', rule, 'protocol', proto])
+
+ self.cli_commit()
+
+ original = """
+ 85: from all to 203.0.113.12 ipproto tcp lookup 104
+ """
+ tmp = cmd('ip rule show prio 85')
+
+ self.assertEqual(sort_ip(tmp), sort_ip(original))
+
# Test set table for sources with fwmark
def test_fwmark_sources_table_id(self):
path = base_path + ['local-route']