Commit 20c9eb76 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

updated tests on 412 for SOL003 VNFLCM

parent d1f91967
......@@ -65,13 +65,13 @@ PATCH Individual VNFInstance
PATCH Individual VNFInstance Precondition failed
[Documentation] Test ID: 7.3.1.2.5
... Test title: PATCH Individual VNFInstance Precondition failed
... Test objective: The objective is to create a new VNF instance resource
... Pre-conditions: ETag mismatch
... Test objective: The objective is to test that modification of a VNF instance resource fails when a precondition given in an HTTP request header is not fulfilled due to an ETag mismatch
... an existing VNF instance resource
... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: VNFInstance not modified
PATCH individual vnfInstance
... Post-Conditions: none
PATCH individual vnfInstance - Etag mismatch
Check HTTP Response Status Code Is 412
Check HTTP Response Body Json Schema Is ProblemDetails
......
......@@ -559,6 +559,19 @@ PATCH individual vnfInstance
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH individual vnfInstance - Etag mismatch
log Trying to modify an individual VNF instance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
Set Headers {"If-Match": "${invalid_etag}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File
${template}= Get File jsons/patchBodyRequest.json
${body}= Format String ${template} vnfdId=${Descriptor_ID} vnfdVersion= ${Descriptor_Version}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE individual vnfInstance
log Trying to delete an individual VNF instance
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
......
......@@ -17,6 +17,8 @@ ${apiMajorVersion} v1
${CancelMode} GRACEFUL
${VNFM_DUPLICATION} 0
${invalid_etag} invalid etag
${NFVO_HOST} localhost # Hostname of the NFVO
${NFVO_PORT} 8081 # Listening port of the NFVO
${NFVO_SCHEMA} https
......
Supports Markdown
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