Tests Cleanup: Fix missing calls to setUpClass/tearDownClass.
Continuation/Part 2 of https://gerrit.fd.io/r/#/c/17092/
Change-Id: Id0122d84eaf2c05d29e5be63a594d5e528ee7c9a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
diff --git a/test/test_nat.py b/test/test_nat.py
index b8d3a54..5cd0ad9 100644
--- a/test/test_nat.py
+++ b/test/test_nat.py
@@ -1562,6 +1562,10 @@
super(TestNAT44, cls).tearDownClass()
raise
+ @classmethod
+ def tearDownClass(cls):
+ super(TestNAT44, cls).tearDownClass()
+
def test_dynamic(self):
""" NAT44 dynamic translation test """
self.nat44_add_address(self.nat_addr)
@@ -4276,6 +4280,10 @@
super(TestNAT44EndpointDependent, cls).tearDownClass()
raise
+ @classmethod
+ def tearDownClass(cls):
+ super(TestNAT44EndpointDependent, cls).tearDownClass()
+
def test_frag_in_order(self):
""" NAT44 translate fragments arriving in order """
self.nat44_add_address(self.nat_addr)
@@ -6466,6 +6474,10 @@
super(TestNAT44Out2InDPO, cls).tearDownClass()
raise
+ @classmethod
+ def tearDownClass(cls):
+ super(TestNAT44Out2InDPO, cls).tearDownClass()
+
def configure_xlat(self):
self.dst_ip6_pfx = '1:2:3::'
self.dst_ip6_pfx_n = socket.inet_pton(socket.AF_INET6,
@@ -6581,6 +6593,10 @@
super(TestDeterministicNAT, cls).tearDownClass()
raise
+ @classmethod
+ def tearDownClass(cls):
+ super(TestDeterministicNAT, cls).tearDownClass()
+
def create_stream_in(self, in_if, out_if, ttl=64):
"""
Create packet stream for inside network
@@ -7200,6 +7216,10 @@
super(TestNAT64, cls).tearDownClass()
raise
+ @classmethod
+ def tearDownClass(cls):
+ super(TestNAT64, cls).tearDownClass()
+
def test_nat64_inside_interface_handles_neighbor_advertisement(self):
""" NAT64 inside interface handles Neighbor Advertisement """
@@ -8533,6 +8553,10 @@
super(TestDSlite, cls).tearDownClass()
raise
+ @classmethod
+ def tearDownClass(cls):
+ super(TestDSlite, cls).tearDownClass()
+
def verify_syslog_apmadd(self, data, isaddr, isport, xsaddr, xsport,
sv6enc, proto):
message = data.decode('utf-8')
@@ -8727,6 +8751,10 @@
super(TestDSliteCE, cls).tearDownClass()
raise
+ @classmethod
+ def tearDownClass(cls):
+ super(TestDSliteCE, cls).tearDownClass()
+
def test_dslite_ce(self):
""" Test DS-Lite CE """
@@ -8830,6 +8858,10 @@
super(TestNAT66, cls).tearDownClass()
raise
+ @classmethod
+ def tearDownClass(cls):
+ super(TestNAT66, cls).tearDownClass()
+
def test_static(self):
""" 1:1 NAT66 test """
self.vapi.nat66_add_del_interface(self.pg0.sw_if_index)