summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-10-26 16:57:51 +0200
committerGitHub <noreply@github.com>2022-10-26 16:57:51 +0200
commita61e1a78fe116bb44fe55be3493de7c4dbe8db97 (patch)
treefcc18784759f8b75ca51dbc2fd253140059cdaa4 /smoketest/scripts
parent2e3e25514004f11d2238793752536fbc43f4bbf4 (diff)
parent16207f7a8ffdbc93fcfcc4b6ba783940a1e40e33 (diff)
downloadvyos-1x-a61e1a78fe116bb44fe55be3493de7c4dbe8db97.tar.gz
vyos-1x-a61e1a78fe116bb44fe55be3493de7c4dbe8db97.zip
Merge pull request #1618 from sarthurdev/T4764
nat: T4764: Remove NAT tables on node deletion
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-xsmoketest/scripts/cli/test_nat.py6
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}')