diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2024-02-27 21:29:08 +0100 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-02-28 19:36:10 +0000 |
commit | e1f34b0c019b9771ace1d6c723d4d84658be5cd8 (patch) | |
tree | b97f26a412c1e4ee7edc0c0e06c48b995a829530 /smoketest/scripts/cli/test_nat66.py | |
parent | fdfe194634f7a15c2299a3a3bffbe64fe578f466 (diff) | |
download | vyos-1x-e1f34b0c019b9771ace1d6c723d4d84658be5cd8.tar.gz vyos-1x-e1f34b0c019b9771ace1d6c723d4d84658be5cd8.zip |
smoketest: T5160: Deduplicate nftables verify functions to testcase class, remove obsolete imports
(cherry picked from commit bc9ccaeda54279022b73a806fa8aa77c523fbecc)
Diffstat (limited to 'smoketest/scripts/cli/test_nat66.py')
-rwxr-xr-x | smoketest/scripts/cli/test_nat66.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/smoketest/scripts/cli/test_nat66.py b/smoketest/scripts/cli/test_nat66.py index 0607f6616..400a895ff 100755 --- a/smoketest/scripts/cli/test_nat66.py +++ b/smoketest/scripts/cli/test_nat66.py @@ -22,8 +22,6 @@ import unittest from base_vyostest_shim import VyOSUnitTestSHIM from vyos.configsession import ConfigSessionError -from vyos.utils.process import cmd -from vyos.utils.dict import dict_search base_path = ['nat66'] src_path = base_path + ['source'] @@ -42,17 +40,6 @@ class TestNAT66(VyOSUnitTestSHIM.TestCase): self.cli_delete(base_path) self.cli_commit() - def verify_nftables(self, nftables_search, table, inverse=False, args=''): - nftables_output = cmd(f'sudo nft {args} list table {table}') - - for search in nftables_search: - matched = False - for line in nftables_output.split("\n"): - if all(item in line for item in search): - matched = True - break - self.assertTrue(not matched if inverse else matched, msg=search) - def test_source_nat66(self): source_prefix = 'fc00::/64' translation_prefix = 'fc01::/64' |