Commit de33b652 authored by Najam UI Hassan's avatar Najam UI Hassan
Browse files

templating, minor fix and new testcases added

parent 26fefaf4
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ GET Individual VNF Indicator Subscription with invalid resource identifier
    ...    Post-Conditions: none
    GET Individual VNF Indicator Subscription with invalid resource identifier
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is   ProblemDetails

DELETE Individual VNF Indicator Subscription
    [Documentation]    Test ID: 7.3.6.5.3
@@ -68,7 +69,6 @@ PUT Individual VNF Indicator Subscription - Method not implemented
    ...    Post-Conditions: The individual VNF indicator subscription is not modified by the operation
    Send Put Request for Individual VNF Indicator Subscription
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF indicator subscription Unmodified (Implicit)

PATCH Individual VNF Indicator Subscription - Method not implemented
    [Documentation]    Test ID: 7.3.6.5.6
@@ -78,10 +78,9 @@ PATCH Individual VNF Indicator Subscription - Method not implemented
    ...    Reference: Clause 8.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The individual VNF indicator subscription is not modified by the operation
    ...    Post-Conditions: none
    Send Patch Request for Individual VNF Indicator Subscription
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF indicator subscription Unmodified (Implicit) 
    
POST Individual VNF Indicator Subscription - Method not implemented
    [Documentation]    Test ID: 7.3.6.5.7
@@ -91,7 +90,6 @@ POST Individual VNF Indicator Subscription - Method not implemented
    ...    Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The individual VNF indicator subscription is not created by the operation
    ...    Post-Conditions: none
    Send Post Request for Individual VNF Indicator Subscription
    Check HTTP Response Status Code Is    405 
 No newline at end of file
    Check Postcondition VNF indicator subscription is not created  
 No newline at end of file
+3 −3
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ Get Individual Indicator for VNF Instance with invalid indicator identifier
    ...    Post-Conditions: none
    Get Individual Indicator for a VNF instance with invalid indicator identifier
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is   ProblemDetails

POST Individual VNF Indicator for VNF Instance - Method not implemented
    [Documentation]    Test ID: 7.3.6.3.3
@@ -77,7 +78,6 @@ DELETE Individual VNF Indicator for VNF Instance - Method not implemented
    ...    Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The individual indicator for the VNF instance is not deleted by the unsuccessful operations
    ...    Post-Conditions: none
    Send DELETE Request for individual indicator in VNF instance
    Check HTTP Response Status Code Is    405
 No newline at end of file
    Check Postcondition Indicator for VNF instance Exist
 No newline at end of file
+2 −3
Original line number Diff line number Diff line
@@ -143,10 +143,9 @@ DELETE VNF Indicator Subscriptions - Method not implemented
    ...    Reference: Clause 8.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF indicator subscriptions are not deleted by the failed operation   
    ...    Post-Conditions: none
    Send Delete Request for VNF Indicator Subscriptions
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Indicator Subscriptions Exists

GET All VNF Indicator Subscriptions as Paged Response
    [Documentation]    Test ID: 7.3.6.4.11
@@ -159,7 +158,7 @@ GET All VNF Indicator Subscriptions as Paged Response
    ...    Post-Conditions: none        
    Get All VNF Indicators Subscriptions
    Check HTTP Response Status Code Is    200
    Check LINK in Header
    Check HTTP Response Header Contain Link
    
GET VNF Indicator Subscriptions - Bad Request Response too Big
    [Documentation]    Test ID: 7.3.6.4.12
+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ Get all VNF Indicators as Paged Response
    ...    Post-Conditions: none
    Get all VNF indicators
    Check HTTP Response Status Code Is    200
    Check LINK in Header
    Check HTTP Response Header Contain Link

Get VNF Indicators - Bad Request Response too Big
    [Documentation]    Test ID: 7.3.6.1.13
+6 −28
Original line number Diff line number Diff line
@@ -103,7 +103,8 @@ Send Post Request for VNF Indicator Subscription
    Log    Trying to create a new subscription
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${body}=    Get File    jsons/subscriptions.json
    ${template}=    Get File    jsons/subscriptions.json
    ${body}=        Format String   ${template}     callback=${callback}    {callback_subscribe}=${callback_subscribe}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    POST    ${apiRoot}/${apiName}/${apiVersion}/subscriptions    ${body}
    ${output}=    Output    response
@@ -125,7 +126,8 @@ Send Post Request for Duplicated VNF indicator Subscription
    Log    Trying to create a subscription with an already created content
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${body}=    Get File    jsons/subscriptions.json
     ${template}=    Get File    jsons/subscriptions.json
    ${body}=        Format String   ${template}     callback=${callback}    {callback_subscribe}=${callback_subscribe}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    POST    ${apiRoot}/${apiName}/${apiVersion}/subscriptions    ${body}
    ${output}=    Output    response
@@ -403,14 +405,6 @@ Check HTTP Response Body Includes Requested VNF Instances ID
    Log    Check Response includes Indicators according to resource identifier
    Should Be Equal As Strings   ${response['body'][0]['vnfInstanceId']}    ${vnfInstanceId}

Check Postcondition Indicators for VNF instance Exist
    Log    Check Postcondition Indicators for VNF instance Exist
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}
    Should Be Equal    ${response['status']}    200
    

Get Individual Indicator for a VNF instance
    Log    This resource represents a VNF indicator related to a VNF instance.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -473,10 +467,6 @@ Check Postcondition Indicator for VNF instance Exist
    Should Be Equal    ${response['body']['vnfInstanceId']}    ${vnfInstanceId}
    Should Be Equal    ${response['body']['id']}    ${indicatorId}  

Check Postcondition VNF Indicator Subscriptions Exists
    Log    Checking that subscriptions exists
    Get all VNF Indicators Subscriptions  

GET Individual VNF Indicator Subscription
    Log    Trying to get a given subscription identified by subscriptionId
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -542,18 +532,6 @@ Check Postcondition Individual VNF Indicator Subscription is Deleted
    GET Individual VNF Indicator Subscription
    Check HTTP Response Status Code Is    404

Check Postcondition VNF indicator subscription Unmodified (Implicit)
    Log    Check Postcondition subscription is not modified
    GET Individual VNF Indicator Subscription
    Log    Check Response matches original subscription
    ${subscription}=    evaluate    json.loads('''${response['body']}''')    json
    Should Be Equal    ${origResponse['body']['callbackUri']}    ${subscription.callbackUri}
    
Check Postcondition VNF indicator subscription is not created
    Log    Check Postcondition subscription is not created
    GET Individual VNF Indicator Subscription with invalid resource identifier
    Check HTTP Response Status Code Is    404

Create Sessions
    Pass Execution If    ${VNFM_CHECKS_NOTIF_ENDPOINT} == 0   MockServer not necessary to run    
    Start Process  java  -jar  ${MOCK_SERVER_JAR}    -serverPort  ${callback_port}  alias=mockInstance
@@ -568,6 +546,6 @@ Check Notification Endpoint
    Wait Until Keyword Succeeds    ${total_polling_time}   ${polling_interval}   Verify Mock Expectation    ${notification_request}
    Clear Requests  ${callback_endpoint}

Check LINK in Header
Check HTTP Response Header Contain Link
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}
Loading