Inconsistency in MockServer configuration parameters
It appears that the config variables for Mockserver are sometimes used differently, e.g. sometimes they are used independently:
*** Keywords ***
Create Sessions
Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance
Wait For Process handle=mockInstance timeout=5s on_timeout=continue
Create Mock Session ${callback_uri}:${callback_port}
SOL003 vnf inicator api variables:
${callback_uri} http://localhost
${callback_port} 9091
while some other times:
Send Post Request for VNF Package Subscription
Log Trying to create a new subscription
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
${template}= Get File jsons/subscriptions.json
${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId} **<- assumes port is included in the uri **
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1
... Check Notification Endpoint
Create Sessions
Pass Execution If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not started as NFVO is not checking the notification endpoint
Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance
Wait For Process handle=mockInstance timeout=5s on_timeout=continue
Create Mock Session ${callback_uri} **<- assumes port is included in the uri**
My understanding would be that the correct version to be supported is the one with ${callback_uri}:${callback_port}
.
Edited by Michele Carignani