fix karaf launch error from tox 76/74576/2
authorMartial COULIBALY <martial.coulibaly@gfi.fr>
Fri, 27 Jul 2018 12:15:22 +0000 (14:15 +0200)
committerguillaume.lambert <guillaume.lambert@orange.com>
Sat, 28 Jul 2018 21:56:48 +0000 (23:56 +0200)
Add a karaf launch option 'server' in python nose files.
This option disables the karaf local console.
(OPTS="-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true")

Change-Id: Iac160454fa6a74aa31813dacbb74a94dce417592
Signed-off-by: Martial COULIBALY <martial.coulibaly@gfi.fr>
tests/transportpce_tests/test_pce.py
tests/transportpce_tests/test_portmapping.py
tests/transportpce_tests/test_servicehandler.py

index a83f7b786132ad51e1e8aa182d0a87637b92c2c1..05b23c59da5488d09f59817d46e7d7fe131a555e 100644 (file)
@@ -42,7 +42,7 @@ class TransportPCEtesting(unittest.TestCase):
         executable = "../karaf/target/assembly/bin/karaf"
         with open('odl.log', 'w') as outfile:
             cls.odl_process = subprocess.Popen(
-                ["bash", executable], stdout=outfile,
+                ["bash", executable, "server"], stdout=outfile,
                 stdin=open(os.devnull))
 
     @classmethod
index 296b7963cf75506a81945878df77eea164cef919..9e30fd614ea3e482ee6010155d9fd41bb8e0dbab 100644 (file)
@@ -36,13 +36,13 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
                 cls.testtools_process1 = subprocess.Popen(
                     ["java", "-jar", executable, "--schemas-dir", "schemas",
                      "--initial-config-xml", "sample_configs/ord_1.2.1/sample-config-ROADM.xml",
-                     "--starting-port","17830"],
+                     "--starting-port", "17830"],
                     stdout=outfile)
             with open('testtools2.log', 'w') as outfile:
                 cls.testtools_process2 = subprocess.Popen(
                     ["java", "-jar", executable, "--schemas-dir", "schemas",
                      "--initial-config-xml", "sample_configs/ord_1.2.1/sample-config-XPDR.xml",
-                     "--starting-port","17831"],
+                     "--starting-port", "17831"],
                     stdout=outfile)
 
     @classmethod
@@ -50,7 +50,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         executable = "../karaf/target/assembly/bin/karaf"
         with open('odl.log', 'w') as outfile:
             cls.odl_process = subprocess.Popen(
-                ["bash", executable], stdout=outfile,
+                ["bash", executable, "server"], stdout=outfile,
                 stdin=open(os.devnull))
 
     @classmethod
@@ -94,7 +94,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.not_found)
         res = response.json()
         self.assertIn(
-            {"error-type":"application","error-tag":"data-missing",
+            {"error-type":"application", "error-tag":"data-missing",
              "error-message":"Request could not be completed because the relevant data model content does not exist "},
             res['errors']['error'])
 
@@ -255,7 +255,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.not_found)
         res = response.json()
         self.assertIn(
-            {"error-type":"application","error-tag":"data-missing",
+            {"error-type":"application", "error-tag":"data-missing",
              "error-message":"Request could not be completed because the relevant data model content does not exist "},
             res['errors']['error'])
 
@@ -269,7 +269,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.not_found)
         res = response.json()
         self.assertIn(
-            {"error-type":"application","error-tag":"data-missing",
+            {"error-type":"application", "error-tag":"data-missing",
              "error-message":"Request could not be completed because the relevant data model content does not exist "},
             res['errors']['error'])
 
@@ -293,7 +293,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.not_found)
         res = response.json()
         self.assertIn(
-            {"error-type":"application","error-tag":"data-missing",
+            {"error-type":"application", "error-tag":"data-missing",
              "error-message":"Request could not be completed because the relevant data model content does not exist "},
             res['errors']['error'])
 
@@ -306,7 +306,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.not_found)
         res = response.json()
         self.assertIn(
-            {"error-type":"application","error-tag":"data-missing",
+            {"error-type":"application", "error-tag":"data-missing",
              "error-message":"Request could not be completed because the relevant data model content does not exist "},
             res['errors']['error'])
 
index 48e5978909649f4fbc30e54704d142a87e7e1ec9..9e3dffdec74c9703a2a58ca5e33d65e7fdc057ff 100644 (file)
@@ -37,7 +37,7 @@ class TransportPCEtesting(unittest.TestCase):
         executable = "../karaf/target/assembly/bin/karaf"
         with open('odl.log', 'w') as outfile:
             cls.odl_process = subprocess.Popen(
-                ["bash", executable], stdout=outfile,
+                ["bash", executable, "server"], stdout=outfile,
                 stdin=open(os.devnull))
 
     @classmethod