aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_ipsec_default.py
diff options
context:
space:
mode:
authorKlement Sekera <klement.sekera@gmail.com>2022-04-23 11:34:29 +0200
committerOle Tr�an <otroan@employees.org>2022-04-29 09:57:47 +0000
commit16ce09db9e3d7cf588037c80138438095a0ac200 (patch)
treeda24ebad3bb76459b5ab1c08454ca5c0348310d6 /test/test_ipsec_default.py
parent8eeb851d6f9a92911cf0e7f209d9aa31c707d26e (diff)
tests: fix assert_nothing_captured
Type: fix Fixes: 26cd0242c95025e0d644db3a80dfe8dee83b6d7a Change-Id: I9a88221af65f170dc6b1f0dc0992df401e489fa2 Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Diffstat (limited to 'test/test_ipsec_default.py')
-rw-r--r--test/test_ipsec_default.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/test_ipsec_default.py b/test/test_ipsec_default.py
index 71bbd759297..6ee6f7822a2 100644
--- a/test/test_ipsec_default.py
+++ b/test/test_ipsec_default.py
@@ -34,6 +34,7 @@ packets are dropped as expected.
class IPSecInboundDefaultDrop(IPSecIPv4Fwd):
""" IPSec: inbound packets drop by default with no matching rule """
+
def test_ipsec_inbound_default_drop(self):
# configure two interfaces and bind the same SPD to both
self.create_interfaces(2)
@@ -84,8 +85,8 @@ class IPSecInboundDefaultDrop(IPSecIPv4Fwd):
self.pg_interfaces[1].enable_capture()
self.pg_start()
# confirm traffic has now been dropped
- self.pg1.assert_nothing_captured("inbound pkts with no matching \
- rules NOT dropped by default")
+ self.pg1.assert_nothing_captured(remark="inbound pkts with no matching"
+ "rules NOT dropped by default")
# both policies should not have matched any further packets
# since we've dropped at input stage
self.verify_policy_match(pkt_count, outbound_policy)
@@ -94,6 +95,7 @@ class IPSecInboundDefaultDrop(IPSecIPv4Fwd):
class IPSecOutboundDefaultDrop(IPSecIPv4Fwd):
""" IPSec: outbound packets drop by default with no matching rule """
+
def test_ipsec_inbound_default_drop(self):
# configure two interfaces and bind the same SPD to both
self.create_interfaces(2)
@@ -145,12 +147,14 @@ class IPSecOutboundDefaultDrop(IPSecIPv4Fwd):
self.pg_interfaces[1].enable_capture()
self.pg_start()
# confirm traffic was dropped and not forwarded
- self.pg1.assert_nothing_captured("outbound pkts with no matching \
- rules NOT dropped by default")
+ self.pg1.assert_nothing_captured(
+ remark="outbound pkts with no matching rules NOT dropped "
+ "by default")
# inbound rule should have matched twice the # of pkts now
self.verify_policy_match(pkt_count*2, inbound_policy)
# as dropped at outbound, outbound policy is the same
self.verify_policy_match(pkt_count, outbound_policy)
+
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)