From: Guillaume Lambert Date: Thu, 24 Jun 2021 13:01:55 +0000 (+0200) Subject: Set different controller ports in tox tests suites X-Git-Tag: 4.0.0~37 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=transportpce.git;a=commitdiff_plain;h=d3f738ebc8fb5f7501cde960cd887f115cd96eba Set different controller ports in tox tests suites JIRA: TRNSPRTPCE-482 Signed-off-by: Guillaume Lambert Change-Id: I62243181953654c053166c8eb4f1fad82567f618 --- diff --git a/tests/transportpce_tests/common/test_utils.py b/tests/transportpce_tests/common/test_utils.py index ffaaab8ff..65bd2bba8 100644 --- a/tests/transportpce_tests/common/test_utils.py +++ b/tests/transportpce_tests/common/test_utils.py @@ -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 154f8a8ee..be29d12ce 100644 --- 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:}