Bump lighty.io core and add tests support for it
[transportpce.git] / tests / transportpce_tests / 1.2.1 / test_gnpy.py
index 3cdb2e4e3e0ed7dab164389035c1bd18174ed9b0..157ee8461bdbe152e094c6ca9f4b72c1d27d2577 100644 (file)
@@ -19,6 +19,7 @@ import subprocess
 import time
 import unittest
 import logging
+import test_utils
 
 class TransportGNPYtesting(unittest.TestCase):
 
@@ -31,18 +32,12 @@ class TransportGNPYtesting(unittest.TestCase):
         if os.path.isfile("./transportpce_tests/gnpy.log"):
             os.remove("transportpce_tests/gnpy.log")
 
-    @classmethod
-    def __start_odl(cls):
-        executable = "../karaf/target/assembly/bin/karaf"
-        with open('transportpce_tests/odl.log', 'w') as outfile:
-            cls.odl_process = subprocess.Popen(
-                ["bash", executable, "server"], stdout=outfile,
-                stdin=open(os.devnull))
-
     @classmethod
     def setUpClass(cls):
-        cls.__start_odl()
+        print ("starting opendaylight...")
+        cls.odl_process = test_utils.start_tpce()
         time.sleep(30)
+        print ("opendaylight started")
 
     @classmethod
     def tearDownClass(cls):