Commit fa293a63 authored by Mike-no's avatar Mike-no Committed by Giacomo Bernini
Browse files

add PATCH test for unsupported Last-Modified and ETag HTTP headers

parent 857fbb42
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -78,6 +78,19 @@ PATCH Individual Capacity Threshold - Precondition Failed
    Check HTTP Response Status Code Is    412
    Check HTTP Response Body Json Schema Is   ProblemDetails

PATCH Individual Capacity Threshold - Precondition Failed HTTP Conditional Request Not Supported
    [Documentation]    Test ID: 5.3.6.4.6b
    ...    Test title: PATCH Individual Capacity Threshold - Precondition Failed HTTP Conditional Request Not Supported
    ...    Test objective: The objective is to that the modification of individual Capacity Threshold fails because the API Producer does not support "Last-Modified" and "ETag" HTTP Headers
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.5.3.4, 4.5 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: API Producer does not support "Last-Modified" and "ETag" HTTP Headers
    ...    Post-Conditions: none
    PATCH Individual Capacity Threshold - HTTP Conditional Request not supported
    Check HTTP Response Status Code Is    412
    Check HTTP Response Body Json Schema Is   ProblemDetails
    
PATCH Individual Capacity Threshold - Unprocessible Entity
    [Documentation]    Test ID: 5.3.6.4.7
    ...    Test title: PATCH Individual Capacity Threshold - Precondition Failed
+13 −0
Original line number Diff line number Diff line
@@ -418,6 +418,19 @@ PATCH Individual Capacity Threshold - ETag mismatch
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 

PATCH Individual Capacity Threshold - HTTP Conditional Request not supported
    Pass Execution If    ${PRODUCER_SUPPORT_COND_REQ} == 1    NVFO allows conditional requests, skipping test
    log    Trying to perform a PATCH to modify individual VNF snapshot
    Set Headers  {"Accept":"${ACCEPT_JSON}"}  
    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}"}
    ${template} =    Get File    jsons/CapacityThresholdModificationRequest.json
    ${body}=        Format String   ${template}     callback_uri=${new_callback_uri}
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds/${capacityThreshold}    ${body} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 

PATCH Individual Capacity Threshold - Unreachable CallbackURI
    log    Trying to perform a PATCH to modify individual VNF snapshot
    Set Headers  {"Accept":"${ACCEPT_JSON}"}  
+3 −1
Original line number Diff line number Diff line
@@ -37,3 +37,5 @@ ${vimId}
${invalidVimId}
${capacityThreshold}
${invalid_capacityThreshold}

${PRODUCER_SUPPORT_COND_REQ}    1