aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_vcl.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_vcl.py')
-rw-r--r--test/test_vcl.py108
1 files changed, 106 insertions, 2 deletions
diff --git a/test/test_vcl.py b/test/test_vcl.py
index 34cf0e2a391..bd7eb76f07e 100644
--- a/test/test_vcl.py
+++ b/test/test_vcl.py
@@ -32,7 +32,15 @@ class VCLAppWorker(Worker):
class VCLTestCase(VppTestCase):
""" VCL Test Class """
- def __init__(self, methodName):
+ @classmethod
+ def setUpClass(cls):
+ super(VCLTestCase, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(VCLTestCase, cls).tearDownClass()
+
+ def setUp(self):
var = "VPP_BUILD_DIR"
self.build_dir = os.getenv(var, None)
if self.build_dir is None:
@@ -51,7 +59,7 @@ class VCLTestCase(VppTestCase):
if os.path.isfile("/tmp/ldp_server_af_unix_socket"):
os.remove("/tmp/ldp_server_af_unix_socket")
- super(VCLTestCase, self).__init__(methodName)
+ super(VCLTestCase, self).setUp()
def cut_thru_setup(self):
self.vapi.session_enable_disable(is_enabled=1)
@@ -222,6 +230,14 @@ class VCLTestCase(VppTestCase):
class LDPCutThruTestCase(VCLTestCase):
""" LDP Cut Thru Tests """
+ @classmethod
+ def setUpClass(cls):
+ super(LDPCutThruTestCase, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(LDPCutThruTestCase, cls).tearDownClass()
+
def setUp(self):
super(LDPCutThruTestCase, self).setUp()
@@ -290,6 +306,14 @@ class LDPCutThruTestCase(VCLTestCase):
class VCLCutThruTestCase(VCLTestCase):
""" VCL Cut Thru Tests """
+ @classmethod
+ def setUpClass(cls):
+ super(VCLCutThruTestCase, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(VCLCutThruTestCase, cls).tearDownClass()
+
def setUp(self):
super(VCLCutThruTestCase, self).setUp()
@@ -339,6 +363,14 @@ class VCLCutThruTestCase(VCLTestCase):
class LDPThruHostStackEcho(VCLTestCase):
""" LDP Thru Host Stack Echo """
+ @classmethod
+ def setUpClass(cls):
+ super(LDPThruHostStackEcho, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(LDPThruHostStackEcho, cls).tearDownClass()
+
def setUp(self):
super(LDPThruHostStackEcho, self).setUp()
@@ -362,6 +394,14 @@ class LDPThruHostStackEcho(VCLTestCase):
class VCLThruHostStackEcho(VCLTestCase):
""" VCL Thru Host Stack Echo """
+ @classmethod
+ def setUpClass(cls):
+ super(VCLThruHostStackEcho, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(VCLThruHostStackEcho, cls).tearDownClass()
+
def setUp(self):
super(VCLThruHostStackEcho, self).setUp()
@@ -385,6 +425,14 @@ class VCLThruHostStackEcho(VCLTestCase):
class VCLThruHostStackBidirNsock(VCLTestCase):
""" VCL Thru Host Stack Bidir Nsock """
+ @classmethod
+ def setUpClass(cls):
+ super(VCLThruHostStackBidirNsock, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(VCLThruHostStackBidirNsock, cls).tearDownClass()
+
def setUp(self):
super(VCLThruHostStackBidirNsock, self).setUp()
@@ -414,6 +462,14 @@ class VCLThruHostStackBidirNsock(VCLTestCase):
class LDPThruHostStackBidirNsock(VCLTestCase):
""" LDP Thru Host Stack Bidir Nsock """
+ @classmethod
+ def setUpClass(cls):
+ super(LDPThruHostStackBidirNsock, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(LDPThruHostStackBidirNsock, cls).tearDownClass()
+
def setUp(self):
super(LDPThruHostStackBidirNsock, self).setUp()
@@ -449,6 +505,14 @@ class LDPThruHostStackBidirNsock(VCLTestCase):
class LDPThruHostStackNsock(VCLTestCase):
""" LDP Thru Host Stack Nsock """
+ @classmethod
+ def setUpClass(cls):
+ super(LDPThruHostStackNsock, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(LDPThruHostStackNsock, cls).tearDownClass()
+
def setUp(self):
super(LDPThruHostStackNsock, self).setUp()
@@ -481,6 +545,14 @@ class LDPThruHostStackNsock(VCLTestCase):
class VCLThruHostStackNsock(VCLTestCase):
""" VCL Thru Host Stack Nsock """
+ @classmethod
+ def setUpClass(cls):
+ super(VCLThruHostStackNsock, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(VCLThruHostStackNsock, cls).tearDownClass()
+
def setUp(self):
super(VCLThruHostStackNsock, self).setUp()
@@ -513,6 +585,14 @@ class VCLThruHostStackNsock(VCLTestCase):
class LDPThruHostStackIperf(VCLTestCase):
""" LDP Thru Host Stack Iperf """
+ @classmethod
+ def setUpClass(cls):
+ super(LDPThruHostStackIperf, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(LDPThruHostStackIperf, cls).tearDownClass()
+
def setUp(self):
super(LDPThruHostStackIperf, self).setUp()
@@ -544,6 +624,14 @@ class LDPThruHostStackIperf(VCLTestCase):
class LDPIpv6CutThruTestCase(VCLTestCase):
""" LDP IPv6 Cut Thru Tests """
+ @classmethod
+ def setUpClass(cls):
+ super(LDPIpv6CutThruTestCase, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(LDPIpv6CutThruTestCase, cls).tearDownClass()
+
def setUp(self):
super(LDPIpv6CutThruTestCase, self).setUp()
@@ -619,6 +707,14 @@ class LDPIpv6CutThruTestCase(VCLTestCase):
class VCLIpv6CutThruTestCase(VCLTestCase):
""" VCL IPv6 Cut Thru Tests """
+ @classmethod
+ def setUpClass(cls):
+ super(VCLIpv6CutThruTestCase, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(VCLIpv6CutThruTestCase, cls).tearDownClass()
+
def setUp(self):
super(VCLIpv6CutThruTestCase, self).setUp()
@@ -674,6 +770,14 @@ class VCLIpv6CutThruTestCase(VCLTestCase):
class VCLIpv6ThruHostStackEcho(VCLTestCase):
""" VCL IPv6 Thru Host Stack Echo """
+ @classmethod
+ def setUpClass(cls):
+ super(VCLIpv6ThruHostStackEcho, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(VCLIpv6ThruHostStackEcho, cls).tearDownClass()
+
def setUp(self):
super(VCLIpv6ThruHostStackEcho, self).setUp()