diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-01-11 19:42:04 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-01-11 19:42:04 +0100 |
commit | 9db4dbc4a84ff1a110617cb3c7849d7c9d4a62e7 (patch) | |
tree | de1bdb8f7c4ab2f1bee7faab8b16c7e8904fcbce /smoketest | |
parent | a7fe2ff4fdfcb2619b892aff170d42609965b20b (diff) | |
download | vyos-1x-9db4dbc4a84ff1a110617cb3c7849d7c9d4a62e7.tar.gz vyos-1x-9db4dbc4a84ff1a110617cb3c7849d7c9d4a62e7.zip |
nat: T3206: unable to delete only rules but keep destination node
Diffstat (limited to 'smoketest')
-rwxr-xr-x | smoketest/scripts/cli/test_nat.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/smoketest/scripts/cli/test_nat.py b/smoketest/scripts/cli/test_nat.py index 7ca82f86f..b82805661 100755 --- a/smoketest/scripts/cli/test_nat.py +++ b/smoketest/scripts/cli/test_nat.py @@ -138,7 +138,6 @@ class TestNAT(unittest.TestCase): else: self.assertEqual(iface, inbound_iface_200) - def test_snat_required_translation_address(self): # T2813: Ensure translation address is specified rule = '5' @@ -156,5 +155,16 @@ class TestNAT(unittest.TestCase): self.session.set(src_path + ['rule', rule, 'translation', 'address', 'masquerade']) self.session.commit() + def test_nat_no_rules(self): + # T3206: deleting all rules but keep the direction 'destination' or + # 'source' resulteds in KeyError: 'rule'. + # + # Test that both 'nat destination' and 'nat source' nodes can exist + # without any rule + self.session.set(src_path) + self.session.set(dst_path) + self.session.commit() + + if __name__ == '__main__': unittest.main(verbosity=2) |