Commit bef78107 authored by M. Rehan Abbasi's avatar M. Rehan Abbasi Committed by Giacomo Bernini
Browse files

fix POST subscriptions - unprocessable entity test case

parent 229861a9
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -675,6 +675,18 @@ Send Post Request for Subscription
    Run Keyword If    ${NFVMANO_CHECKS_NOTIF_ENDPOINT} == 1
    Run Keyword If    ${NFVMANO_CHECKS_NOTIF_ENDPOINT} == 1
    ...       Check Notification Endpoint
    ...       Check Notification Endpoint


Send Post Request for Subscription with Unreachable callbackUri
    Set headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Set headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": ${AUTHORIZATION}"} 
    ${template}=    Get File    jsons/CimSubscriptionRequest.json
    ${body_request}=        Format String   ${template}     callback_uri=${unreachable_callback_uri}    callback_endpoint=${callback_endpoint}
    POST    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body_request}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Run Keyword If    ${NFVMANO_CHECKS_NOTIF_ENDPOINT} == 1
    ...       Check Notification Endpoint

Check HTTP Response Body CimSubscription Attributes Values Match the Issued Subscription
Check HTTP Response Body CimSubscription Attributes Values Match the Issued Subscription
    Log    Check Response matches subscription
    Log    Check Response matches subscription
    ${template}=    Get File    jsons/CimSubscriptionRequest.json
    ${template}=    Get File    jsons/CimSubscriptionRequest.json
+2 −2
Original line number Original line Diff line number Diff line
@@ -176,12 +176,12 @@ DELETE Subscriptions - Method not implemented
POST Create a new subscription - Unprocessable Entity
POST Create a new subscription - Unprocessable Entity
    [Documentation]    Test ID: 8.3.1.10.13
    [Documentation]    Test ID: 8.3.1.10.13
    ...    Test title: POST Create a new Subscription - Unprocessable Entity
    ...    Test title: POST Create a new Subscription - Unprocessable Entity
    ...    Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed.
    ...    Test objective: The objective is to test that for a POST request for a new subscription, if the test by NFV-MANO for notification endpoint fails, then error 422 will be returned.
    ...    Pre-conditions: none
    ...    Pre-conditions: none
    ...    Reference: clause 5.5.4.3.1 - ETSI GS NFV-SOL 009 [7] v3.5.1
    ...    Reference: clause 5.5.4.3.1 - ETSI GS NFV-SOL 009 [7] v3.5.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none 
    ...    Post-Conditions: none 
    Send Post Request for Subscription
    Send Post Request for Subscription with Unreachable callbackUri
    Check HTTP Response Status Code Is    422
    Check HTTP Response Status Code Is    422
    Check HTTP Response Body Json Schema Is  ProblemDetails
    Check HTTP Response Body Json Schema Is  ProblemDetails
+1 −0
Original line number Original line Diff line number Diff line
@@ -36,6 +36,7 @@ ${peerEntityId}


${callback_port}    9091
${callback_port}    9091
${callback_uri}    http://172.22.1.7:${callback_port}
${callback_uri}    http://172.22.1.7:${callback_port}
${unreachable_callback_uri}   http://unreachable_callback_uri-error-code-422
${callback_endpoint}    /subscriptions
${callback_endpoint}    /subscriptions
${filter_ok}      callbackUri=${callbackUri}
${filter_ok}      callbackUri=${callbackUri}
${filter_ko}      erroneousFilter=erroneous
${filter_ko}      erroneousFilter=erroneous