Skip to content
Snippets Groups Projects
Commit 138f73c0 authored by Najam UI Hassan's avatar Najam UI Hassan Committed by Giacomo Bernini
Browse files

authorization testcases added

parent 14bb2b3d
No related branches found
No related tags found
2 merge requests!199Merge "3.3.1 dev" into "release 3" master,!1743.3.1 dev sol009
......@@ -113,7 +113,6 @@ GET information about Logging Jobs with "exclude_default" attribute selector
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is LoggingJobs
GET information about Logging Jobs with "fields" attribute selector
[Documentation] Test ID: 8.3.4.1.9
... Test title: GET information about Logging Jobs with fields attribute selector
......@@ -166,6 +165,42 @@ GET information about Logging Jobs with Paged Response
Check HTTP Response Status Code Is 200
Check HTTP Response Header Contains Link
GET information about Logging Jobs with malformed authorization token
[Documentation] Test ID: 8.3.1.8.13
... Test title: GET information about Logging Jobs with malformed authorization token
... Test objective: The objective is to test that the retrieval of information about Logging Jobs fails when using malformed authorization token.
... Pre-conditions: none
... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] v3.3.1
... Config ID: Config_prod_NFV-MANO
... Applicability: The Peer Entity requires the usage of access tokens for authorizing the API requests.
... Post-Conditions: none
GET Logging Jobs with malformed authorization token
Check HTTP Response Status Code Is 401
GET information about Logging Jobs without authorization token
[Documentation] Test ID: 8.3.4.1.14
... Test title: GET information about Logging Jobs without authorization token
... Test objective: The objective is to test that the retrieval of information about Logging Jobs fails when omitting the authorization token.
... Pre-conditions: none
... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] v3.3.1
... Config ID: Config_prod_NFV-MANO
... Applicability: The Peer Entity requires the usage of access tokens for authorizing the API requests.
... Post-Conditions: none
GET Logging Jobs without authorization token
Check HTTP Response Status Code Is 401
GET information about Logging Jobs with expired or revoked authorization token
[Documentation] Test ID: 8.3.4.1.15
... Test title: GET information about Logging Jobs with expired or revoked authorization token
... Test objective: The objective is to test that the retrieval of information about Logging Jobs fails when using expired or revoked authorization token.
... Pre-conditions: none
... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] v3.3.1
... Config ID: Config_prod_NFV-MANO
... Applicability: The Peer Entity requires the usage of access tokens for authorizing the API requests.
... Post-Conditions: none
GET Logging Jobs with expired or revoked authorization token
Check HTTP Response Status Code Is 401
PUT Logging Jobs - Method not implemented
[Documentation] Test ID: 8.3.4.1.13
... Test title: PUT Logging Jobs - Method not implemented
......
......@@ -52,6 +52,35 @@ GET Logging Jobs
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
GET Logging Jobs with malformed authorization token
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as NFVO is not supporting authentication
Log The GET method queries using invalid token
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Authorization": "${BAD_AUTHORIZATION}"}
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs
${output}= Output response
Set Suite Variable ${response} ${output}
GET Logging Jobs without authorization token
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as it is not supporting authentication
Log The GET method queries omitting token
Set Headers {"Accept": "${ACCEPT_JSON}"}
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs
${output}= Output response
Set Suite Variable ${response} ${output}
GET Logging Jobs with expired or revoked authorization token
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as it is not supporting authentication
Log The GET method queries using invalid token
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Authorization": "${NEG_AUTHORIZATION}"}
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs
${output}= Output response
Set Suite Variable ${response} ${output}
GET Logging Job with invalid filter
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
......
......@@ -9,6 +9,7 @@ ${erroneousLogJobId} wrongID
${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${NEG_AUTHORIZATION} Bearer negativetoken
${BAD_AUTHORIZATION} Bear sometoken
${CONTENT_TYPE} application/json
${CONTENT_TYPE_JSON} application/json
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment