summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_firewall.py
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2025-05-21 14:01:00 +0200
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2025-05-21 14:37:44 +0200
commit5918dcce154a6a0e44a31b3ff5bf20b625250502 (patch)
treebef48f48fa8729820c26c5c17986c5c4e63e9485 /smoketest/scripts/cli/test_firewall.py
parent60a05334688bf4bd3754eab565e0662f0dd3dec4 (diff)
downloadvyos-1x-5918dcce154a6a0e44a31b3ff5bf20b625250502.tar.gz
vyos-1x-5918dcce154a6a0e44a31b3ff5bf20b625250502.zip
flowtable: T7350: Prevent interface deletion if referenced on flowtable
Diffstat (limited to 'smoketest/scripts/cli/test_firewall.py')
-rwxr-xr-xsmoketest/scripts/cli/test_firewall.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_firewall.py b/smoketest/scripts/cli/test_firewall.py
index 851a15f16..bbe4de9df 100755
--- a/smoketest/scripts/cli/test_firewall.py
+++ b/smoketest/scripts/cli/test_firewall.py
@@ -1113,6 +1113,12 @@ class TestFirewall(VyOSUnitTestSHIM.TestCase):
self.verify_nftables_chain([['accept']], 'ip vyos_conntrack', 'FW_CONNTRACK')
self.verify_nftables_chain([['accept']], 'ip6 vyos_conntrack', 'FW_CONNTRACK')
+ # Test interface deletion
+ self.cli_delete(['interfaces', 'ethernet', 'eth0', 'vif', '10'])
+
+ with self.assertRaises(ConfigSessionError):
+ self.cli_commit()
+
def test_zone_flow_offload(self):
self.cli_set(['firewall', 'flowtable', 'smoketest', 'interface', 'eth0'])
self.cli_set(['firewall', 'flowtable', 'smoketest', 'offload', 'hardware'])