diff --git a/SOL009/NFVMANOLogManagement-API/LoggingJobs.robot b/SOL009/NFVMANOLogManagement-API/LoggingJobs.robot index c72f4b107731936076109c48c04ee8b1eb20a537..329a1c5f3df0b8bf3898e8a34c275d290bb140be 100644 --- a/SOL009/NFVMANOLogManagement-API/LoggingJobs.robot +++ b/SOL009/NFVMANOLogManagement-API/LoggingJobs.robot @@ -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 diff --git a/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot b/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot index d2cc5cae0a637d1349f57e7a3b58cf5781bcbcb8..dfaf7ab2e5b1d3fb4bf15e8f816941ea3cb2d305 100644 --- a/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot +++ b/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot @@ -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}"} diff --git a/SOL009/NFVMANOLogManagement-API/environment/variables.txt b/SOL009/NFVMANOLogManagement-API/environment/variables.txt index aff90b476deaa5799d6cca531773e09fe22d0139..4a30d550ac4686d700b404262d71aa3e560a38b6 100644 --- a/SOL009/NFVMANOLogManagement-API/environment/variables.txt +++ b/SOL009/NFVMANOLogManagement-API/environment/variables.txt @@ -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