Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
api-tests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NFV - Network Functions Virtualisation
api-tests
Commits
69be8e5c
Commit
69be8e5c
authored
3 years ago
by
M. Rehan Abbasi
Committed by
Giacomo Bernini
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
move individual PM job keywords to common NFVMANO PM keyword file
parent
8169ecd6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!230
Merging "3.5.1 dev" into "Release 3"
,
!209
SOL009 NFV MANO Performance Management - Implementation of deltas between v3.5.1 and v3.3.1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
SOL009/NFVMANOPerformanceManagement-API/IndividualPmJob.robot
+1
-89
1 addition, 89 deletions
...09/NFVMANOPerformanceManagement-API/IndividualPmJob.robot
SOL009/NFVMANOPerformanceManagement-API/NFVMANOPMKeywords.robot
+69
-0
69 additions, 0 deletions
.../NFVMANOPerformanceManagement-API/NFVMANOPMKeywords.robot
with
70 additions
and
89 deletions
SOL009/NFVMANOPerformanceManagement-API/IndividualPmJob.robot
+
1
−
89
View file @
69be8e5c
...
...
@@ -3,6 +3,7 @@ Library JSONSchemaLibrary schemas/
Resource
environment/variables.txt
# Generic Parameters
Library
JSONLibrary
Resource
environment/IndividualPmJob.txt
Resource
NFVMANOPMKeywords.robot
Library
REST
${NFVMANO_SCHEMA}
://
${NFVMANO_HOST}
:
${NFVMANO_PORT}
ssl_verify=false
*** Test Cases ***
...
...
@@ -93,92 +94,3 @@ DELETE Individual NFV-MANO Performance Job with invalid resource identifier
...
Post-Conditions: none
Send Delete request for individual NFV-MANO Performance Job with invalid resource identifier
Check HTTP Response Status Code Is
404
*** Keywords ***
GET individual NFV-MANO Performance Job
Log
Trying to get a Pm Job
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${pmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
GET individual NFV-MANO Performance Job with invalid resource identifier
Log
Trying to perform a negative get, using erroneous PM Job identifier
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${erroneousPmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Send Delete request for individual NFV-MANO Performance Job
Log
Trying to delete an existing PM Job
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
DELETE
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${pmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Send Delete request for individual NFV-MANO Performance Job with invalid resource identifier
Log
Trying to perform a negative delete, using erroneous PM Job identifier
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
DELETE
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${erroneousPmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Send Post request for individual NFV-MANO Performance Job
Log
Trying to perform a POST (method should not be implemented)
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
POST
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${newPmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Send Put request for individual NFV-MANO Performance Job
Log
Trying to perform a POST (method should not be implemented)
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${pmJobId}
${origOutput}
=
Output
response
Set Suite Variable
${origResponse}
${origOutput}
PUT
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${pmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Send Patch request for individual NFV-MANO Performance Job
Log
Trying to perform a PATCH (method should not be implemented)
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
PATCH
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${pmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Check Postcondition NFV-MANO Pm Job is Deleted
Log
Check Postcondition
GET individual NFV-MANO Performance Job
Check HTTP Response Status Code Is
404
Check HTTP Response Body Pm Job Identifier matches the requested Pm Job
Log
Going to validate Pm Job info retrieved
Should Be Equal
${response['body']['id']}
${pmJobId}
Log
Pm Job identifier as expected
Check HTTP Response Status Code Is
[
Arguments
]
${expected_status}
${status}
=
Convert To Integer
${expected_status}
Should Be Equal
${response['status']}
${status}
Log
Status code validated
Check HTTP Response Header Contains
[
Arguments
]
${CONTENT_TYPE}
Should Contain
${response['headers']}
${CONTENT_TYPE}
Log
Header is present
Check HTTP Response Body Json Schema Is
[
Arguments
]
${input}
Run Keyword If
'
${input}
' == 'ProblemDetails'
Should Contain
${response['headers']['Content-Type']}
application/problem+json
...
ELSE
Should Contain
${response['headers']['Content-Type']}
application/json
${schema}
=
Catenate
SEPARATOR=
${input}
.schema.json
Validate Json
${schema}
${response['body']}
Log
Json Schema Validation OK
This diff is collapsed.
Click to expand it.
SOL009/NFVMANOPerformanceManagement-API/NFVMANOPMKeywords.robot
+
69
−
0
View file @
69be8e5c
...
...
@@ -212,3 +212,72 @@ Check HTTP Response Body Json Schema Is
Check HTTP Response Header Contains Link
${linkURL}
=
Get Value From Json
${response['headers']}
$..Link
Should Not Be Empty
${linkURL}
GET individual NFV-MANO Performance Job
Log
Trying to get a Pm Job
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${pmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
GET individual NFV-MANO Performance Job with invalid resource identifier
Log
Trying to perform a negative get, using erroneous PM Job identifier
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${erroneousPmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Send Delete request for individual NFV-MANO Performance Job
Log
Trying to delete an existing PM Job
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
DELETE
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${pmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Send Delete request for individual NFV-MANO Performance Job with invalid resource identifier
Log
Trying to perform a negative delete, using erroneous PM Job identifier
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
DELETE
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${erroneousPmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Send Post request for individual NFV-MANO Performance Job
Log
Trying to perform a POST (method should not be implemented)
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
POST
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${newPmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Send Put request for individual NFV-MANO Performance Job
Log
Trying to perform a POST (method should not be implemented)
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${pmJobId}
${origOutput}
=
Output
response
Set Suite Variable
${origResponse}
${origOutput}
PUT
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${pmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Send Patch request for individual NFV-MANO Performance Job
Log
Trying to perform a PATCH (method should not be implemented)
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
PATCH
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/pm_jobs/
${pmJobId}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Check Postcondition NFV-MANO Pm Job is Deleted
Log
Check Postcondition
GET individual NFV-MANO Performance Job
Check HTTP Response Status Code Is
404
Check HTTP Response Body Pm Job Identifier matches the requested Pm Job
Log
Going to validate Pm Job info retrieved
Should Be Equal
${response['body']['id']}
${pmJobId}
Log
Pm Job identifier as expected
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment