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

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

PATCH test for IndividualNSDescriptor for API Producer not supporting Last-Modified and ETag HTTP Headers
parent 48b8c104
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -107,6 +107,18 @@ Enable Individual Network Service Descriptor with HTTP Etag precondition failure
    Send PATCH to enable Individual Network Service Descriptor with HTTP Etag precondition failure
    Check HTTP Response Status Code Is    412

Enable Individual Network Service Descriptor with HTTP Conditional Request Not Supported Precondition Failure
    [Documentation]    Test ID: 5.3.1.2.7b
    ...    Test title:  Enable Individual Network Service Descriptor with HTTP Conditional Request Not Supported Precondition Failure
    ...    Test objective: The objective is to test that the retrieval of an Network Service Descriptor fails if the API Producer does not support "Last-Modified" and "ETag" HTTP Headers
    ...    Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO in ENABLED operational state (Test ID 5.3.1.2.4).
    ...    Reference: Clause 5.4.3.3.4 - 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 enable Individual Network Service Descriptor with HTTP Conditional Request not supported
    Check HTTP Response Status Code Is    412

Void
     [Documentation]    Test ID: 5.3.1.2.8
    ...    Test title: Void
+13 −1
Original line number Diff line number Diff line
@@ -264,6 +264,18 @@ Send PATCH to enable Individual Network Service Descriptor in onboarding state d
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Send PATCH to enable Individual Network Service Descriptor with 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. As prerequisite the nsdInfo 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/NsdInfoModificationEnable.json
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    REST.PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId}    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Send DELETE Request for Individual Network Service Descriptor
    Log    Trying to perform a DELETE nsdInfo. The nsdInfo should be in "NOT_USED" usageState and in "DISABLED" operationalState.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
+2 −0
Original line number Diff line number Diff line
@@ -87,3 +87,5 @@ ${Designer}
${NS_Name}
${NS_Version}
${NS_InvariantId}

${PRODUCER_SUPPORT_COND_REQ}    1
 No newline at end of file