Commit 871b2cd4 authored by Elian Kraja's avatar Elian Kraja
Browse files

Bug fixing: Issues #23-#28

parent b557b65c
......@@ -118,10 +118,7 @@ GET all Pm Jobs - exclude_fields
${reports}= Get Value From Json ${result} $..reports
Should Be Empty ${reports}
Log Reports element is empty as expected
Log Checking that criteria element is missing
${criteria}= Get Value From Json ${result} $..criteria
Should Be Empty ${criteria}
Log Criteria element is empty as expected
GET all Pm Jobs - Negative (wronge filter name)
Log Trying to get all PM Jobs present in the VNFM, using an erroneous filter param
......
......@@ -108,7 +108,9 @@ Send Request Grant Request
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
${body}= Get File jsons/grantRequest.json
${response}= Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body}
Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body}
${body}= Output response
Set Suite Variable &{response} ${body}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
......@@ -117,20 +119,19 @@ Check HTTP Response Status Code Is
Check HTTP Response Header Contains
[Arguments] ${CONTENT_TYPE}
Should Contain ${response.headers} ${CONTENT_TYPE}
Should Contain ${response[0]['headers']} ${CONTENT_TYPE}
Log Header is present
Check HTTP Response Body Json Schema Is
[Arguments] ${schema}
${json}= evaluate json.loads('''${response.body}''') json
Validate Json ${schema} ${json}
Validate Json ${schema} ${response[0]['body']}
Log Json Schema Validation OK
Get an individual grant - Successful
log Trying to read an individual grant
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${response.headers.Location}
Get ${response[0]['headers']['Location']}
Log Validate Status code
Integer response status 200
${result}= Output response body
......
......@@ -7,7 +7,6 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}
Documentation This resource represents an individual grant. The client can use this resource to read the grant.
... It is determined by means outside the scope of the present document, such as configuration or policy,
... how long an individual grant is available.
Suite Setup Check resource existance
*** Test Cases ***
Post Individual Grant - Method not implemented
......@@ -97,7 +96,7 @@ DELETE an individual grant - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId}
Log Validate Status code
Integer response status 204
Integer response status 405
*** Keywords ***
Check resource existance
......
......@@ -9,7 +9,7 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}
GET VNFD in Individual VNF Package (PLAIN)
Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgPlainVNFD}/vnfd
Integer response status 200
${contentType}= Output response headers Content-Type
......@@ -18,7 +18,7 @@ GET VNFD in Individual VNF Package (PLAIN)
GET VNFD in Individual VNF Package (ZIP)
Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd
Integer response status 200
${contentType}= Output response headers Content-Type
......@@ -28,7 +28,7 @@ GET VNFD in Individual VNF Package (PLAIN-ZIP)
Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd
Integer response status 200
${contentType}= Output response headers Content-Type
......@@ -37,7 +37,7 @@ GET VNFD in Individual VNF Package (PLAIN-ZIP)
GET VNFD in Individual VNF Package - Negative (PLAIN/ZIP)
Log Trying to get a negative case performing a get on a VNFD from a given VNF Package present in the NFVO Catalogue. Accept will be text/plain but VNFD is composed my multiple files.
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd
Integer response status 406
${contentType}= Output response headers Content-Type
......@@ -51,7 +51,7 @@ GET VNFD in Individual VNF Package - Negative (Not Found)
Log Trying to perform a negative get, using an erroneous package ID
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPkgId}/vnfd
Integer response status 404
Log Received 404 Not Found as expected
......@@ -66,7 +66,7 @@ GET VNFD in Individual VNF Package - Negative (onboardingState issue)
Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${onboardingStateVnfPkgId}/vnfd
Integer response status 409
Log Received 409 Conflict as expected
......@@ -80,7 +80,7 @@ GET VNFD in Individual VNF Package - Negative (onboardingState issue)
POST VNFD in Individual VNF Package (Method not implemented)
Log Trying to perform a POST (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/vnfd
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -88,7 +88,7 @@ POST VNFD in Individual VNF Package (Method not implemented)
PUT VNFD in Individual VNF Package (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/vnfd
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -96,7 +96,7 @@ PUT VNFD in Individual VNF Package (Method not implemented)
PATCH VNFD in Individual VNF Package (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/vnfd
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -104,7 +104,7 @@ PATCH VNFD in Individual VNF Package (Method not implemented)
DELETE VNFD in Individual VNF Package (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Integer response status 405
Log Received 405 Method not implemented as expected
......
......@@ -26,10 +26,6 @@ GET all Packages
${additional_artifacts}= Get Value From Json ${result} $..additionalArtifacts
Should Be Empty ${additional_artifacts}
Log additionalArtifact element is missing as excepted
Log Checking missing information for _links element
${links}= Get Value From Json ${result} $.._links
Should Be Empty ${links}
Log _links element is missing as excepted
GET all Packages - Filter
Log Trying to get all VNF Packages present in the NFVO Catalogue, using filter params
......@@ -131,10 +127,7 @@ GET all Packages - exclude_default
${additional_artifacts}= Get Value From Json ${vnfPkgInfos} $..additionalArtifacts
Should Be Empty ${additional_artifacts}
Log additionalArtifact element is missing as excepted
Log Checking missing information for _links element
${links}= Get Value From Json ${vnfPkgInfos} $.._links
Should Be Empty ${links}
Log _links element is missing as excepted
GET all Packages - fields
Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields
......
*** Variables ***
${vnfPackageId} 4bbca710-c00e-11e8-b568-0800200c9a66
${erroneousVnfPackageId} erroneousVnfPackageId # Given ID for vnfPkg not present in database
......@@ -119,10 +119,7 @@ GET all Pm Jobs - exclude_fields
${reports}= Get Value From Json ${result} $..reports
Should Be Empty ${reports}
Log Reports element is empty as expected
Log Checking that criteria element is missing
${criteria}= Get Value From Json ${result} $..criteria
Should Be Empty ${criteria}
Log Criteria element is empty as expected
GET all Pm Jobs - Negative (wronge filter name)
Log Trying to get all PM Jobs present in the VNFM, using an erroneous filter param
......
......@@ -9,7 +9,7 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}
GET VNFD in Individual VNF Package (PLAIN)
Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgPlainVNFD}/vnfd
Integer response status 200
${contentType}= Output response headers Content-Type
......@@ -18,7 +18,7 @@ GET VNFD in Individual VNF Package (PLAIN)
GET VNFD in Individual VNF Package (ZIP)
Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd
Integer response status 200
${contentType}= Output response headers Content-Type
......@@ -28,7 +28,7 @@ GET VNFD in Individual VNF Package (PLAIN-ZIP)
Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd
Integer response status 200
${contentType}= Output response headers Content-Type
......@@ -38,7 +38,7 @@ GET VNFD in Individual VNF Package (PLAIN-ZIP)
GET VNFD in Individual VNF Package - Negative (PLAIN/ZIP)
Log Trying to get a negative case performing a get on a VNFD from a given VNF Package present in the NFVO Catalogue. Accept will be text/plain but VNFD is composed my multiple files.
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd
Integer response status 406
${contentType}= Output response headers Content-Type
......@@ -52,7 +52,7 @@ GET VNFD in Individual VNF Package - Negative (Not Found)
Log Trying to perform a negative get, using an erroneous package ID
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPkgId}/vnfd
Integer response status 404
Log Received 404 Not Found as expected
......@@ -67,7 +67,7 @@ GET VNFD in Individual VNF Package - Negative (onboardingState issue)
Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${onboardingStateVnfPkgId}/vnfd
Integer response status 409
Log Received 409 Conflict as expected
......@@ -82,7 +82,7 @@ POST VNFD in Individual VNF Package (Method not implemented)
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a POST (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/vnfd
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -91,7 +91,7 @@ PUT VNFD in Individual VNF Package (Method not implemented)
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/vnfd
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -100,7 +100,7 @@ PATCH VNFD in Individual VNF Package (Method not implemented)
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/vnfd
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -109,7 +109,7 @@ DELETE VNFD in Individual VNF Package (Method not implemented)
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Integer response status 405
Log Received 405 Method not implemented as expected
*** Variables ***
${vnfPackageId} 4bbca710-c00e-11e8-b568-0800200c9a66
${erroneousVnfPackageId} erroneousVnfPackageId # Given ID for vnfPkg not present in database
${disabledVnfPackageId} 87a2c9d3-00ea-4032-8c67-a5106d001868
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment