Fix func. tests utils base URL generation issue 23/99523/3
authorguillaume.lambert <guillaume.lambert@orange.com>
Sat, 29 Jan 2022 11:38:08 +0000 (12:38 +0100)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Sat, 29 Jan 2022 11:48:19 +0000 (11:48 +0000)
RESTCONF base URL is generated by concatenating a string to a
configurable port number.
This port number is loosely typed with an integer.
If this is working well on most systems, it has been reported this
concatenation raises an error on some installation.

Casting explicitly the port number to a string in the concatenation
should solve the issue.

Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: Iff503422cf3a881b178618a439d810c918b52953

tests/transportpce_tests/common/test_utils_rfc8040.py

index b2cfc4c4c75599fb626f9699dd289ca9a4ce7feb..c65c51ddd7af7eda3e26d853984105ea0ad17309 100644 (file)
@@ -63,7 +63,7 @@ if 'USE_ODL_RESTCONF_VERSION' in os.environ:
 else:
     RESTCONF_VERSION = 'rfc8040'
 
-RESTCONF_BASE_URL = 'http://localhost:' + RESTCONF_PORT + RESTCONF_PATH_PREFIX[RESTCONF_VERSION]
+RESTCONF_BASE_URL = 'http://localhost:' + str(RESTCONF_PORT) + RESTCONF_PATH_PREFIX[RESTCONF_VERSION]
 
 if 'USE_ODL_ALT_KARAF_INSTALL_DIR' in os.environ:
     KARAF_INSTALLDIR = os.environ['USE_ODL_ALT_KARAF_INSTALL_DIR']