diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2022-10-25 12:29:03 +0200 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2022-10-25 22:42:20 +0200 |
commit | 2a5273e650ce1242bc22e992e5a3104961ec1295 (patch) | |
tree | ae130bd6e6dab4c5c0b1a167e4de1c269b10c328 /smoketest/scripts/cli | |
parent | ec82d60828500a56b6fe8357970bf839053ac0af (diff) | |
download | vyos-1x-2a5273e650ce1242bc22e992e5a3104961ec1295.tar.gz vyos-1x-2a5273e650ce1242bc22e992e5a3104961ec1295.zip |
nat: T4764: Remove tables on NAT deletion
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-x | smoketest/scripts/cli/test_nat.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_nat.py b/smoketest/scripts/cli/test_nat.py index f824838c0..2ae90fcaf 100755 --- a/smoketest/scripts/cli/test_nat.py +++ b/smoketest/scripts/cli/test_nat.py @@ -16,6 +16,7 @@ import jmespath import json +import os import unittest from base_vyostest_shim import VyOSUnitTestSHIM @@ -28,6 +29,9 @@ src_path = base_path + ['source'] dst_path = base_path + ['destination'] static_path = base_path + ['static'] +nftables_nat_config = '/run/nftables_nat.conf' +nftables_static_nat_conf = '/run/nftables_static-nat-rules.nft' + class TestNAT(VyOSUnitTestSHIM.TestCase): @classmethod def setUpClass(cls): @@ -40,6 +44,8 @@ class TestNAT(VyOSUnitTestSHIM.TestCase): def tearDown(self): self.cli_delete(base_path) self.cli_commit() + self.assertFalse(os.path.exists(nftables_nat_config)) + self.assertFalse(os.path.exists(nftables_static_nat_conf)) def verify_nftables(self, nftables_search, table, inverse=False, args=''): nftables_output = cmd(f'sudo nft {args} list table {table}') |