Commit 8b76cd34 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

Merge branch 'master' into 'master'

Master

See merge request !26
parents 66c6513d 18c90d5f
Loading
Loading
Loading
Loading
+22 −2
Original line number Diff line number Diff line
@@ -4,7 +4,11 @@ Resource environment/variables.txt # Generic Parameters
Resource          environment/subscriptions.txt
Library           OperatingSystem
Library           JSONLibrary
Library           REST    ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT}
Library           Process
Library           MockServerLibrary    
Library           REST    ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT}    ssl_verify=false
Suite Setup       Create Sessions
Suite Teardown    Terminate All Processes    kill=true

*** Test Cases ***
GET VNF Indicators Subscriptions
@@ -152,6 +156,8 @@ Send Post Request for VNF Indicator Subscription
    POST    ${apiRoot}/${apiName}/${apiVersion}/subscriptions    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}  
    Run Keyword If    ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1
    ...       Check Notification Endpoint 

Send Put Request for VNF Indicator Subscriptions
    Log    Trying to create a new subscription
@@ -215,3 +221,17 @@ Check Postcondition VNF Indicator Subscription Is Set
Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter
    Log    Check Response includes VNF Indicators according to filter
    #todo


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
    Wait For Process  handle=mockInstance  timeout=5s  on_timeout=continue
    Create Mock Session  ${callback_uri}:${callback_port}
    
Check Notification Endpoint
    &{notification_request}=  Create Mock Request Matcher	GET  ${callback_endpoint}    
    &{notification_response}=  Create Mock Response	headers="Content-Type: application/json"  status_code=204
    Create Mock Expectation  ${notification_request}  ${notification_response}
    Wait Until Keyword Succeeds    ${total_polling_time}   ${polling_interval}   Verify Mock Expectation    ${notification_request}
    Clear Requests  ${callback_endpoint}
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -5,3 +5,5 @@ ${erroneousIndicatorId} erroneousIndicatorId
${POS_FILTER}     callbackUri=http://127.0.0.1/subscribe
${NEG_FILTER}     callback=http://127.0.0.1/subscribe
${response}=    httpresponse
${total_polling_time}   2 min
${polling_interval}     10 sec
+9 −0
Original line number Diff line number Diff line
@@ -14,3 +14,12 @@ ${AUTH_USAGE} 1
${apiRoot}        /
${apiVersion}     v1
${apiName}        vnfind


${VNFM_CHECKS_NOTIF_ENDPOINT}    0

${MOCK_SERVER_JAR}    ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
${callback_uri}    http://localhost
${callback_port}    9091
${callback_endpoint}    /endpoint
${callback_endpoint_error}    /endpoint_404
 No newline at end of file
+4 −4
Original line number Diff line number Diff line
*** Settings ***
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt    # Generic Parameters
Library           REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
Library           REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
Library           OperatingSystem
Library           JSONLibrary
Resource          VNFPerformanceManagementKeywords.robot
@@ -84,17 +84,17 @@ Create duplicated VNF Performance subscription with VNFM not creating duplicated
    [Tags]    no-duplicated-subs
    [Documentation]    Test ID 6.3.3.6.6
    ...    Test title: Create duplicated VNF Performance subscription with VNFM not creating duplicated subscriptions
    ...    Test objective: The objective is to test the creation of a duplicated VNF performance subscription and check that no new subscription is created
    ...    Test objective: The objective is to test the attempt of a creation of a duplicated VNF performance subscription and check that no new subscription is created by the VNFM and a link to the original subscription is returned
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
    ...    Reference: section 6.4.7.3.1 - SOL002 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: The VNFM does not support the creation of duplicated subscriptions
    ...    Post-Conditions: The existing VNF performance subscription returned is set and it is valid 
    ...    Post-Conditions: The existing VNF performance subscription returned is available in the VNFM 
    Send Post Request for Duplicated VNF Performance Subscription
    Check HTTP Response Status Code Is    303
    Check HTTP Response Body Is Empty
    Check HTTP Response Header Contains    Location
    Check Postcondition Subscription Resource URI Returned in Location Header Is Valid
    Check Postcondition Subscription Resource Returned in Location Header Is Available

Create duplicated VNF Performance subscription with VNFM creating duplicated subscriptions
    [Tags]    duplicated-subs
+1 −1
Original line number Diff line number Diff line
@@ -300,7 +300,7 @@ Check Postcondition VNF Performance Subscription Is Set
    Set Suite Variable    ${response}    ${output}
    Check HTTP Response Status Code Is    200

Check Postcondition Subscription Resource URI Returned in Location Header Is Valid
Check Postcondition Subscription Resource Returned in Location Header Is Available
    Log    Going to check postcondition
    GET    ${response.headers['Location']}
    Integer    response status    200
Loading