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

PATCH test for IndividualAlarm for API Producer not supporting Last-Modified and ETag HTTP Headers

parent 9397dea5
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -98,6 +98,19 @@ PATCH Alarm - Precondition failed
    Check HTTP Response Status Code Is    412
    Check HTTP Response Body Json Schema Is    ProblemDetails

PATCH Alarm - Precondition failed HTTP Conditional Request Not Supported
    [Documentation]    Test ID: 5.3.3.2.7b
    ...    Test title: Modify an individual alarm resource - Precondition failed HTTP Conditional Request Not Supported
    ...    Test objective: The objective is to test that an individual alarm resource cannot be modifed if API Producer does not support "Last-Modified" and "ETag" HTTP Headers
    ...    Pre-conditions: The related alarm exists
    ...    Reference: Clause 8.4.3.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: 
    PATCH Individual Alarm - HTTP Conditional Request not supported
    Check HTTP Response Status Code Is    412
    Check HTTP Response Body Json Schema Is    ProblemDetails

DELETE Individual Alarm - Method not implemented
    [Documentation]    Test ID: 5.3.3.2.8
    ...    Test title:DELETE Individual Alarm - Method not implemented
+12 −0
Original line number Diff line number Diff line
@@ -210,6 +210,18 @@ PATCH Individual Alarm - ETag mismatch
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}

PATCH Individual Alarm - 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. This method modifies an individual alarm resource
    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}"}
    ${body}=    Get File    jsons/alarmModifications.json
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}    ${body}
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}
    
POST Subscription
    Log    Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions
    Set Headers  {"Accept":"${ACCEPT}"}  
+3 −1
Original line number Diff line number Diff line
@@ -62,3 +62,5 @@ ${callbackResp} 127.0.0.1
${nsInstanceIdForNotifications}    SOME-ID
${upperTesterUrlForAlarmNotifications}    http://localhost:9999/uppertester
${instrumentationPlatformSkip}      True

${PRODUCER_SUPPORT_COND_REQ}    1
 No newline at end of file