Set different controller ports in tox tests suites 26/98226/2
authorGuillaume Lambert <guillaume.lambert@orange.com>
Thu, 24 Jun 2021 13:01:55 +0000 (15:01 +0200)
committerVachhani, Shweta (sv111y) <sv111y@att.com>
Sun, 31 Oct 2021 11:20:52 +0000 (07:20 -0400)
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 dfbd32f72ac1056f2464e874c432e09210fbf190..0b5ed5244f2676964dea65ea3701b5975f551033 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"
@@ -65,6 +64,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 281c2e12bde1e84ecd0282cf0a319022bd153a2f..3b3ec4c2b985c6a0c7fd145c3107fabd9489e247 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,6 +112,12 @@ 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:}