Commit fe8dc54d authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

[test-new][SOL003][IC-tests][v5.2.1][11.3.1.15.1 Test-ID] implemented new IC...

[test-new][SOL003][IC-tests][v5.2.1][11.3.1.15.1 Test-ID] implemented new IC test for Subscription creation and notification verification
parent 924e380e
Loading
Loading
Loading
Loading
+46 −1
Original line number Diff line number Diff line
@@ -232,6 +232,29 @@ GET Individual Subscription
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    Subscription

VNF LCM Operation Occurrence Notification
    [Documentation]    Test ID: 7.3.1.36.1
    ...    Test title: VNF LCM Operation Occurrence Notification
    ...    Test objective: The objective is to test that the POST request triggers VNF LCM Operation Occurrence Notification.
    ...    Pre-conditions: A subscription for VNF LCM Operation Occurrence notifications is available in the VNFM.
    ...    Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v5.2.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: none
    ...    Post-Conditions: none 
    Post VNF LCM Operation Occurrence Notification
    Check HTTP Response Status Code Is    204

Test the Notification Endpoint - Successful
    [Documentation]    Test ID: 7.3.1.36.4
    ...    Test title: Test the Notification Endpoint - Successful
    ...    Test objective: The objective is to test the Notification Endpoint provided by the notification consumer.
    ...    Pre-conditions: A notification endpoint is provided by the API consumer upon subscription.
    ...    Reference: Clause 5.4.20.3.2 - ETSI GS NFV-SOL 003 [1] v5.2.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: none
    ...    Post-Conditions: none 
    Get reach the notification endpoint
    Check HTTP Response Status Code Is    204
DELETE an individual subscription
    [Documentation]    Test ID: 7.3.1.18.5
    ...    Test title: DELETE an individual subscription
@@ -933,3 +956,25 @@ Post Rollback operation
    Post     ${VNFM_API_ROOT}/${VNFM_API_NAME}/${VNFM_API_MAJOR_VERSION}/vnf_lcm_op_occs/${globalVnfLcmOpOccId}/rollback
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}

Post VNF LCM Operation Occurrence Notification
    log    Trying to perform a POST to get notification
    Set Headers  {"Accept":"${ACCEPT}"}
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log  Creating mock request and response to handle POST operation on notification endpoint
    ${req1}=    Configure Notification Forward    VnfLcmOpOccs    ${callback_endpoint}    ${callback_endpoint_fwd}
    ${req2}=    Configure Notification Status Handler    ${callback_endpoint_fwd}    ${notificationStatus}
	Log    Verify notification endpoint is tested
    Wait Until Keyword Succeeds    30 sec   3 sec   Verify Mock Expectation    ${req2}
    Clear Requests    ${callback_endpoint}
    Clear Requests    ${callback_endpoint_fwd}

GET reach the notification endpoint  
    Log    Trying to reach the notification endpoint using GET method.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${callback_uri}:${callback_port}/${callback_endpoint}
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}    
    
 No newline at end of file
+22 −0
Original line number Diff line number Diff line
*** Settings ***
Resource        environment/variables.txt
Resource        IC_TC_Keywords.robot
Library         JSONLibrary

*** Test Cases ***

Create a new subscription and verify notification is generated
        [Documentation]         Test ID: 11.3.1.15.1
        ...     Test title: Create a new subscription and verify notification is generated
        ...     Test objective: The objective is to test the interconnected case of subscription resource creation and validation of generation of notification based on the issued filter
        ...     Pre-conditions: None
        ...     Reference: ETSI GS NFV-SOL 003 [1] v5.2.1
        ...     Config ID: Config_prod_NFVO, Config_prod_VNFM
        ...     Applicability: None
        ...     Post-conditions: None
        GET Individual VNF Package
        POST Create a new subscription
        GET Subscriptions
        GET Individual Subscription
        VNF LCM Operation Occurrence Notification
        Test the Notification Endpoint - Successful
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -87,6 +87,8 @@ ${callback_uri} http://localhost
${callback_port}    9091
${callback_endpoint}    /endpoint
${callback_endpoint_fwd}    /endpoint/check
${callbackResp}    http://localhost:9091/endpoint
${notificationStatus}    COMPLETED
${sleep_interval}    20s
${notification_request}    []
${notification_response}    []
@@ -107,7 +109,6 @@ ${HEADER_TEST_SUPPORTED} 0
${scaleInfo}
${element}
${aspectId}
${callbackResp}    localhost
${descriptorType}    SOL001
${check_descriptors}    1
#############internal variables used for descriptor parsing################