Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
blotus committed Sep 23, 2024
1 parent 94febb5 commit 053d003
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/backends/iptables/test_iptables.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,15 @@ def testLogging(self):
self.assertEqual(len(rules), 2)

#Check if the logging chain is called from the main chain

output = run_cmd("iptables", "-L", CHAIN_NAME)
print(output)

rules = [line for line in output.split("\n") if RULES_CHAIN_NAME in line]

self.assertEqual(len(rules), 1)

#Check if logging/drop chain is called from the rules chain
output = run_cmd("iptables", "-L", RULES_CHAIN_NAME)

rules = [line for line in output.split("\n") if LOGGING_CHAIN_NAME in line]

self.assertEqual(len(rules), 1)
Expand Down

0 comments on commit 053d003

Please sign in to comment.