summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2025-09-29 14:06:59 +0300
committerGitHub <noreply@github.com>2025-09-29 14:06:59 +0300
commit5248f1cebd4ac9cd8bebb62aa08ecc042a082f30 (patch)
tree690fb00a657760c12791a41718e5d47b5e29135f /smoketest/scripts/cli
parent5845c4b1c50bc0335284cfb3306e0a91de3efd40 (diff)
parentef6879ca4cd510125e7e4337ecaaa5df9692f27e (diff)
downloadvyos-1x-5248f1cebd4ac9cd8bebb62aa08ecc042a082f30.tar.gz
vyos-1x-5248f1cebd4ac9cd8bebb62aa08ecc042a082f30.zip
Merge pull request #4754 from natali-rs1985/T7815
T7815: VPP: NAT44 rules with port requires protocol specification and vice versa
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_vpp.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_vpp.py b/smoketest/scripts/cli/test_vpp.py
index 3cfc2a853..eb14fb2df 100755
--- a/smoketest/scripts/cli/test_vpp.py
+++ b/smoketest/scripts/cli/test_vpp.py
@@ -1323,6 +1323,13 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
self.cli_set(
base_nat + ['exclude', 'rule', '100', 'local-port', exclude_local_port]
)
+
+ # cannot set local-port without specifying protocol
+ # expect raise ConfigError
+ with self.assertRaises(ConfigSessionError):
+ self.cli_commit()
+
+ self.cli_set(base_nat + ['exclude', 'rule', '100', 'protocol', 'tcp'])
self.cli_set(
base_nat + ['static', 'rule', '100', 'external', 'address', static_ext_addr]
)