Fix func. tests utils base URL generation issue 88/99588/1
authorguillaume.lambert <guillaume.lambert@orange.com>
Sat, 29 Jan 2022 11:38:08 +0000 (12:38 +0100)
committerGilles Thouenon <gilles.thouenon@orange.com>
Fri, 4 Feb 2022 09:12:58 +0000 (10:12 +0100)
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 f5e4d1984741d0c11c00805ca112a05c73bdf0f3..c9dea019bed86dacc38ae08fc15cee28ae0b8d09 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']