Set different controller ports in tox tests suites 63/96663/15
authorGuillaume Lambert <guillaume.lambert@orange.com>
Thu, 24 Jun 2021 13:01:55 +0000 (15:01 +0200)
committerguillaume.lambert <guillaume.lambert@orange.com>
Tue, 17 Aug 2021 23:05:44 +0000 (01:05 +0200)
JIRA: TRNSPRTPCE-482
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: I62243181953654c053166c8eb4f1fad82567f618

tests/transportpce_tests/common/test_utils.py
tox.ini

index ffaaab8ff6cd7315dd6527417b9bb919434ceccc..65bd2bba804641036efcdfcea02652c1bfbb0b7f 100644 (file)
@@ -31,7 +31,6 @@ KARAF_OK_START_MSG = re.escape(
     "Blueprint container for bundle org.opendaylight.netconf.restconf")+".* was successfully created"
 LIGHTY_OK_START_MSG = re.escape("lighty.io and RESTCONF-NETCONF started")
 
-RESTCONF_BASE_URL = "http://localhost:8181/restconf"
 ODL_LOGIN = "admin"
 ODL_PWD = "admin"
 NODES_LOGIN = "admin"
@@ -66,6 +65,12 @@ KARAF_LOG = os.path.join(
 
 process_list = []
 
+
+if "USE_ODL_ALT_RESTCONF_PORT" in os.environ:
+    RESTCONF_BASE_URL = "http://localhost:" + os.environ['USE_ODL_ALT_RESTCONF_PORT'] + "/restconf"
+else:
+    RESTCONF_BASE_URL = "http://localhost:8181/restconf"
+
 if "USE_LIGHTY" in os.environ and os.environ['USE_LIGHTY'] == 'True':
     TPCE_LOG = 'odl.log'
 else:
diff --git a/tox.ini b/tox.ini
index 154f8a8ee94febb8d5fa80ec6038cf077724c1bc..be29d12ceec8ed3b651fd200a103e2f9f5cef6d2 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -67,7 +67,7 @@ commands =
 [testenv:testsPCE]
 depends = buildcontroller
 whitelist_externals = launch_tests.sh
-passenv = LAUNCHER
+passenv = LAUNCHER USE_LIGHTY
 commands =
   ./launch_tests.sh pce {posargs:}
 
@@ -76,6 +76,12 @@ depends = buildcontroller,sims121,testsPCE
 #the last dependency is to avoid temporarily concurrent ressources problem to fix in parallel mode
 whitelist_externals = launch_tests.sh
 passenv = LAUNCHER
+setenv =
+    USE_LIGHTY=True
+    USE_ODL_ALT_RESTCONF_PORT=8182
+    USE_ODL_ALT_WEBSOCKET_PORT=8186
+    USE_ODL_ALT_AKKA_PORT=2551
+    USE_ODL_ALT_AKKA_MGT_PORT=8559
 commands =
   ./launch_tests.sh 1.2.1 {posargs:}
 # By default, all tests in the folder transportpce_tests/1.2.1/ are run.
@@ -92,6 +98,12 @@ depends = buildcontroller,sims221,tests121
 #the last dependency is to avoid temporarily concurrent ressources problem to fix in parallel mode
 whitelist_externals = launch_tests.sh
 passenv = LAUNCHER
+setenv =
+    USE_LIGHTY=True
+    USE_ODL_ALT_RESTCONF_PORT=8183
+    USE_ODL_ALT_WEBSOCKET_PORT=8187
+    USE_ODL_ALT_AKKA_PORT=2552
+    USE_ODL_ALT_AKKA_MGT_PORT=8560
 commands =
   ./launch_tests.sh 2.2.1 {posargs:}
 
@@ -100,14 +112,26 @@ depends = buildcontroller,sims71,tests221
 #the last dependency is to avoid temporarily concurrent ressources problem to fix in parallel mode
 whitelist_externals = launch_tests.sh
 passenv = LAUNCHER
+setenv =
+    USE_LIGHTY=True
+    USE_ODL_ALT_RESTCONF_PORT=8184
+    USE_ODL_ALT_WEBSOCKET_PORT=8188
+    USE_ODL_ALT_AKKA_PORT=2553
+    USE_ODL_ALT_AKKA_MGT_PORT=8561
 commands =
   ./launch_tests.sh 7.1 {posargs:}
 
 [testenv:tests_hybrid]
-depends = buildcontroller,sims121,sims221,sims71,tests71
+depends = buildcontroller,sims121,sims221,sims71,tests121,tests221,tests71
 #the last dependency is to avoid temporarily concurrent ressources problem to fix in parallel mode
 whitelist_externals = launch_tests.sh
 passenv = LAUNCHER
+setenv =
+    USE_LIGHTY=True
+    USE_ODL_ALT_RESTCONF_PORT=8182
+    USE_ODL_ALT_WEBSOCKET_PORT=8186
+    USE_ODL_ALT_AKKA_PORT=2551
+    USE_ODL_ALT_AKKA_MGT_PORT=8559
 commands =
 #  nosetests --with-xunit transportpce_tests/hybrid/test01_device_change_notifications.py
   ./launch_tests.sh hybrid {posargs:}