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

PATCH test for IndividualPNFDescriptor for API Producer not supporting...

PATCH test for IndividualPNFDescriptor for API Producer not supporting Last-Modified and ETag HTTP Headers
parent f9321764
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -62,6 +62,18 @@ Update Individual PNF Descriptor with HTTP Etag precondition failure
    Send PATCH to update Individual PNF Descriptor with HTTP Etag precondition failure
    Check HTTP Response Status Code Is    412

Update Individual PNF Descriptor with HTTP Conditional Request Not Supported Precondition Failure
    [Documentation]    Test ID: 5.3.1.5.4b
    ...    Test title:  Update Individual PNF Descriptor with HTTP Conditional Request Not Supported Precondition Failure
    ...    Test objective: The objective is to test that the update of a PNF Descriptor fails due to the API Producer not supporting "Last-Modified" and "ETag" HTTP Headers
    ...    Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO.
    ...    Reference: Clause 5.4.6.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
    Send PATCH to update Individual PNF Descriptor with HTTP Conditional Request Not Supported Precondition Failure
    Check HTTP Response Status Code Is    412

POST Individual PNF Descriptor - Method not implemented
    [Documentation]    Test ID: 5.3.1.5.5
    ...    Test title: POST Individual PNF Descriptor - Method not implemented
+12 −0
Original line number Diff line number Diff line
@@ -626,6 +626,18 @@ Send PATCH to update Individual PNF Descriptor with HTTP Etag precondition failu
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Send PATCH to update Individual PNF Descriptor with HTTP Conditional Request Not Supported Precondition Failure
    Pass Execution If    ${PRODUCER_SUPPORT_COND_REQ} == 1    NVFO allows conditional requests, skipping test
    Log    Trying to perform a PATCH. As prerequisite the pnfdInfo shall be modified by another entity
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Set Headers    {"If-Match": "${wrong_etag}"}
    ${body}=    Get File    jsons/PnfdInfoModification.json
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    REST.PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Send DELETE Request for Individual PNF Descriptor
    Log    Trying to perform a DELETE pnfdInfo.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}