Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
NFV - Network Functions Virtualisation
api-tests
Commits
b6598a73
Commit
b6598a73
authored
Jan 19, 2021
by
Elian Kraja
Browse files
Fix on mockserver configuration
parent
0ec7e72b
Changes
14
Hide whitespace changes
Inline
Side-by-side
SOL002/VNFFaultManagement-API/Subscriptions.robot
View file @
b6598a73
...
...
@@ -320,7 +320,7 @@ Post Create subscription
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/fmSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
callback_endpoint=
${callback_endpoint}
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
SOL002/VNFIndicator-API/Subscriptions.robot
View file @
b6598a73
...
...
@@ -207,7 +207,7 @@ Get VNF Indicators Subscriptions with invalid filter
Set
Suite
Variable
${response}
${output}
Get
VNF
Indicators
Subscriptions
with
invalid
resource
endpoint
Log
Trying
to
perform
a
request
on
a
Uri
which
doesn't
exist
Log
Trying
to
perform
a
request
on
a
Uri
which
doesn't
exist
Set
Headers
{"Accept":
"${ACCEPT_JSON}"}
Run
Keyword
If
${AUTH_USAGE}
==
1
Set
Headers
{"Authorization":
"${AUTHORIZATION}"}
GET
${apiRoot}/${apiName}/${apiMajorVersion}/subscription
...
...
@@ -219,7 +219,7 @@ Send Post Request for VNF Indicator 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}
${body}=
Format
String
${template}
callback_uri=${callback_uri}
:${callback_port}
callback_endpoint=${callback_endpoint}
Run
Keyword
If
${AUTH_USAGE}
==
1
Set
Headers
{"Authorization":
"${AUTHORIZATION}"}
POST
${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions
${body}
${output}=
Output
response
...
...
SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot
View file @
b6598a73
...
...
@@ -789,7 +789,7 @@ Post Create subscription
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/lccnSubscriptionRequest.json
${body}
=
Format String
${template}
vnfdIds=
${vnfdIds}
callback_uri=
${callback_uri}
callback_endpoint=
${callback_endpoint}
${body}
=
Format String
${template}
vnfdIds=
${vnfdIds}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -800,7 +800,7 @@ Post Create subscription - DUPLICATION
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/lccnSubscriptionRequest.json
${body}
=
Format String
${template}
vnfdIds=
${vnfdIds}
callback_uri=
${callback_uri}
callback_endpoint=
${callback_endpoint}
${body}
=
Format String
${template}
vnfdIds=
${vnfdIds}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -811,7 +811,7 @@ Post Create subscription - NO-DUPLICATION
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/lccnSubscriptionRequest.json
${body}
=
Format String
${template}
vnfdIds=
${vnfdIds}
callback_uri=
${callback_uri}
callback_endpoint=
${callback_endpoint}
${body}
=
Format String
${template}
vnfdIds=
${vnfdIds}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
SOL002/VNFPerformanceManagement-API/PMJobs.robot
View file @
b6598a73
...
...
@@ -285,7 +285,7 @@ Send Post Request Create new VNF Performance Monitoring Job
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/CreatePmJobRequest.json
${body}
=
Format String
${template}
objectInstanceIds=
${objectInstanceIds}
callback_uri=
${callback_uri}
${body}
=
Format String
${template}
objectInstanceIds=
${objectInstanceIds}
callback_uri=
${callback_uri}
:
${callback_port}
POST
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs
${body}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
...
...
SOL002/VNFPerformanceManagement-API/Thresholds.robot
View file @
b6598a73
...
...
@@ -176,7 +176,7 @@ Send Post Request Create new Performance Threshold
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
${template}
=
Get File
jsons/CreateThresholdRequest.json
${body}
=
Format String
${template}
objectInstanceIds=
${objectInstanceIds}
callback_uri=
${callback_uri}
${body}
=
Format String
${template}
objectInstanceIds=
${objectInstanceIds}
callback_uri=
${callback_uri}
:
${callback_port}
POST
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/thresholds
${body}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
...
...
SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot
View file @
b6598a73
...
...
@@ -256,7 +256,7 @@ POST Subscription
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/fmSubscriptionRequest.json
${body}
=
Format String
${template}
vnfdIds=
${vnfdIds}
callback_uri=
${callback_uri}
callback_endpoint=
${callback_endpoint}
${body}
=
Format String
${template}
vnfdIds=
${vnfdIds}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -268,7 +268,7 @@ Send POST Request for duplicated subscription
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/fmSubscriptionRequest.json
${body}
=
Format String
${template}
vnfdIds=
${vnfdIds}
callback_uri=
${callback_uri}
callback_endpoint=
${callback_endpoint}
${body}
=
Format String
${template}
vnfdIds=
${vnfdIds}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -280,7 +280,7 @@ Send POST Request for duplicated subscription not permitted
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/fmSubscriptionRequest.json
${body}
=
Format String
${template}
vnfdIds=
${vnfdIds}
callback_uri=
${callback_uri}
callback_endpoint=
${callback_endpoint}
${body}
=
Format String
${template}
vnfdIds=
${vnfdIds}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
SOL003/VNFFaultManagement-API/environment/variables.txt
View file @
b6598a73
...
...
@@ -52,6 +52,7 @@ ${invalidAlarmId} invalidIdAlarm
${fields} criteria,objectInstanceIds
${callback_uri} http://127.0.0.1
${callback_port} 9091
${callback_endpoint} /subscribe
${vnfdIds} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
...
...
SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot
View file @
b6598a73
...
...
@@ -974,7 +974,7 @@ Post Create subscription
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/lccnSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
callback_notification=
${callback_notification}
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_notification=
${callback_notification}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -985,7 +985,7 @@ Post Create subscription - DUPLICATION
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/lccnSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
callback_notification=
${callback_notification}
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_notification=
${callback_notification}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -996,7 +996,7 @@ Post Create subscription - NO-DUPLICATION
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/lccnSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
callback_notification=
${callback_notification}
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_notification=
${callback_notification}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot
View file @
b6598a73
...
...
@@ -95,7 +95,7 @@ Send Post request for new Virtualised Resources Quota Available Notification sub
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/vrQuotaAvailSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
callback_subscribe=
${callback_subscribe}
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_subscribe=
${callback_subscribe}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -107,7 +107,7 @@ Send Post request for new Virtualised Resources Quota Available Notification sub
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/vrQuotaAvailSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
callback_subscribe=
${callback_subscribe}
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_subscribe=
${callback_subscribe}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -119,7 +119,7 @@ Send Post request for new Virtualised Resources Quota Available Notification sub
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/vrQuotaAvailSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
callback_subscribe=
${callback_subscribe}
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_subscribe=
${callback_subscribe}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest
.json
→
SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest.json
View file @
b6598a73
File moved
SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot
View file @
b6598a73
...
...
@@ -214,7 +214,7 @@ POST Subscription
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/fmSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
callback_endpoint=
${callback_endpoint}
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
Post
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -226,7 +226,7 @@ POST Subscription
# Set Headers {"Content-Type": "${CONTENT_TYPE}"}
# Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
# ${template}= Get File jsons/fmSubscriptionRequest.json
# ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint}
# ${body}= Format String ${template} callback_uri=${callback_uri}
:${callback_port}
callback_endpoint=${callback_endpoint}
# Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body}
# ${outputResponse}= Output response
# Set Global Variable ${response} ${outputResponse}
...
...
@@ -238,7 +238,7 @@ POST Subscription
# Set Headers {"Content-Type": "${CONTENT_TYPE}"}
# Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
# ${template}= Get File jsons/fmSubscriptionRequest.json
# ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint}
# ${body}= Format String ${template} callback_uri=${callback_uri}
:${callback_port}
callback_endpoint=${callback_endpoint}
# Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body}
# ${outputResponse}= Output response
# Set Global Variable ${response} ${outputResponse}
...
...
SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot
View file @
b6598a73
...
...
@@ -508,7 +508,7 @@ 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}
Create Mock Session
${callback_uri}
:
${callback_port}
Check Notification Endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
...
...
SOL005/NSPerformanceManagement-API/environment/variables.txt
View file @
b6598a73
...
...
@@ -18,7 +18,7 @@ ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.
${testOptionalMethods} 0
${callback_port} 9091
${callback_uri} http://172.22.1.7
:${callback_port}
${callback_uri} http://172.22.1.7
${callback_endpoint} /nspm/subscriptions
${callback_endpoint_error} /subs_404
${sleep_interval} 20s
...
...
SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot
View file @
b6598a73
...
...
@@ -674,7 +674,7 @@ Send Post Request for VNF Package 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}
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
vnfPkgId=
${vnfPkgId}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
REST.POST
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${output}
=
Output
response
...
...
@@ -687,7 +687,7 @@ Send Post Request for Duplicated VNF Package 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}
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
vnfPkgId=
${vnfPkgId}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
REST.POST
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions
${body}
${output}
=
Output
response
...
...
@@ -720,7 +720,7 @@ Send Delete Request for VNF Package Subscriptions
Check HTTP Response Body PkgmSubscription Attributes Values Match the Issued Subscription
Log
Check Response matches subscription
${template}
=
Get File
jsons/subscriptions.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
callback_endpoint=
${callback_endpoint}
vnfPkgId=
${vnfPkgId}
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
vnfPkgId=
${vnfPkgId}
${subscription}
=
evaluate
json.loads('''
${body}
''')
json
Should Be Equal
${response['body']['callbackUri']}
${subscription['callbackUri']}
...
...
@@ -751,7 +751,7 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab
Validate Json
PkgmSubscription.schema.json
${result}
Log
Validated PkgmSubscription schema
${template}
=
Get File
jsons/subscriptions.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
callback_endpoint=
${callback_endpoint}
vnfPkgId=
${vnfPkgId}
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
vnfPkgId=
${vnfPkgId}
${subscription}
=
evaluate
json.loads('''
${body}
''')
json
Should Be Equal
${result['callbackUri']}
${subscription['callbackUri']}
Log
Validated Issued subscription is same as original
...
...
@@ -873,7 +873,7 @@ Check Notification Endpoint
Check HTTP Response Body Matches the Subscription
Log
Check Response matches subscription
${template}
=
Get File
jsons/subscriptions.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
callback_endpoint=
${callback_endpoint}
vnfPkgId=
${vnfPkgId}
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
vnfPkgId=
${vnfPkgId}
${subscription}
=
evaluate
json.loads('''
${body}
''')
json
Should Be Equal As Strings
${response['body']['callbackUri']}
${subscription['callbackUri']}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment