Commit 150cd91d authored by Hammad Zafar's avatar Hammad Zafar Committed by Giacomo Bernini
Browse files

update for '412 Precondition failed' test case

parent 099ab079
......@@ -67,13 +67,13 @@ PATCH Individual VNFInstance
PATCH Individual VNFInstance Precondition failed
[Documentation] Test ID: 6.3.5.2.5
... Test title: PATCH Individual VNFInstance Precondition failed
... Test objective: The objective is to that the modification of individual VNFInstance fails because precondition given in an HTTP request header is not fulfilled. Typically, this is due to an ETag mismatch, indicating that the resource was modified by another entity.
... Test objective: The objective is to that the modification of individual VNFInstance fails because precondition given in an HTTP request header is not fulfilled due to an ETag mismatch.
... Pre-conditions: none
... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.8.1
... Config ID: Config_prod_VE
... Applicability: none
... Post-Conditions: none
PATCH individual vnfInstance
PATCH individual vnfInstance - ETag mismatch
Check HTTP Response Status Code Is 412
Check HTTP Response Body Json Schema Is ProblemDetails
......@@ -86,7 +86,7 @@ PATCH Individual VNFInstance Conflict
... Config ID: Config_prod_VE
... Applicability: none
... Post-Conditions: none
PATCH individual vnfInstance
PATCH individual vnfInstance
Check HTTP Response Status Code Is 409
Check HTTP Response Body Json Schema Is ProblemDetails
......
......@@ -227,6 +227,20 @@ PATCH individual vnfInstance
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body}
${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 Add VNF Descriptor Content to VNF Instance
${body}= Get File jsons/VnfInfoModificationRequest.json
#${body}= Format String ${template} vnfdId=${descriptor_id}
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}"}
......
......@@ -62,6 +62,7 @@ ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.
${fields}
${original_etag} some_etag
${invalid_eTag} invalid-eTag
${vnfdId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${vnfdId_notEnabled} vnfdId-referring-to-the-VNFPackage-which-is-not-in-ENABLED-state
......
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