diff options
author | Christian Breunig <christian@breunig.cc> | 2024-01-11 06:47:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-11 06:47:28 +0100 |
commit | d0dcbfa475fae4817b0bc4d0718ecf65eae85270 (patch) | |
tree | 8b9ed5ad8e9043c1651189b39dc9307c1e6e7adf /smoketest/scripts | |
parent | 68bacdc20c10566671ce809e9668ca27666bca22 (diff) | |
parent | b68def8d50688eb429328892437647860f9fc6c1 (diff) | |
download | vyos-1x-d0dcbfa475fae4817b0bc4d0718ecf65eae85270.tar.gz vyos-1x-d0dcbfa475fae4817b0bc4d0718ecf65eae85270.zip |
Merge pull request #2794 from sarthurdev/T5787_sagitta
dhcp: T5787: Prevent duplicate IP addresses on static mappings (backport)
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-x | smoketest/scripts/cli/test_service_dhcp-server.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_dhcp-server.py b/smoketest/scripts/cli/test_service_dhcp-server.py index 093e43494..91ae901cd 100755 --- a/smoketest/scripts/cli/test_service_dhcp-server.py +++ b/smoketest/scripts/cli/test_service_dhcp-server.py @@ -202,6 +202,13 @@ class TestServiceDHCPServer(VyOSUnitTestSHIM.TestCase): self.cli_set(pool + ['static-mapping', client, 'ip-address', inc_ip(subnet, client_base)]) client_base += 1 + # cannot have mappings with duplicate IP addresses + with self.assertRaises(ConfigSessionError): + self.cli_set(pool + ['static-mapping', 'dupe1', 'mac', '00:50:00:00:00:01']) + self.cli_set(pool + ['static-mapping', 'dupe1', 'ip-address', inc_ip(subnet, 10)]) + self.cli_commit() + self.cli_delete(pool + ['static-mapping', 'dupe1']) + # commit changes self.cli_commit() |