Master

Merge request reports

Loading
+6 −4
Changes for SOL002/VNFConfiguration-API/environment/variables.txt: 6 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -11,13 +11,15 @@ ${EM-VNF_SCHEMA} https
${ACCEPT}         application/json
${AUTH_USAGE}     1
${AUTHORIZATION}    Bearer    QWxhZGRpbjpvcGVuIHNlc2FtZQ==

${CONTENT_TYPE}    application/json

${apiRoot}        /
${apiName}        vnfconfig
${apiVersion}     v1

${WRONG_AUTHORIZATION}    Bearer    XXXXXWRONGXXXXX
${alarm_filter}       managedObjectId
${managedObjectId}    007c111c-38a1-42c0-a666-7475ecb1567c
${invalid_alarm_filter}    badFilter
${alarmId}    6fc3539c-e602-4afa-8e13-962fb5a7d81d



+6 −7
Changes for SOL002/VNFConfiguration-API/Configuration.robot: 6 added lines, 7 removed lines.
Original line number Diff line number Diff line
*** Settings ***
Resource    environment/variables.txt 
Library    REST    ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT}
Library    REST    ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT}    ssl_verify=false
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    OperatingSystem
@@ -121,14 +121,13 @@ Send VNF configuration
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ${body}=    Get File    jsons/vnfConfigModifications.json
    Patch    ${apiRoot}/${apiName}/${apiVersion}/configuration    ${body}
    Set Suite Variable    &{etag}    ${response['headers']['ETag']}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Check HTTP Response Status Code Is
    [Arguments]    ${expected_status}    
    ${status}=    Convert To Integer    ${expected_status}    
    Should Be Equal    ${response['status']}    ${status}
    Should Be Equal As Strings    ${response['status']}    ${status}
    Log    Status code validated

Check HTTP Response Header Contains
@@ -139,8 +138,8 @@ Check HTTP Response Header Contains
    
Check HTTP Response Body Json Schema Is
    [Arguments]    ${input}
    Should Contain    ${response['headers']['Content-Type']}    application/json
    ${schema} =    Catenate    ${input}    .schema.json
    Should Contain    ${response['headers']['Content-Type']}    application/problem+json
    ${schema}=    Catenate    SEPARATOR=    ${input}    .schema.json
    Validate Json    ${schema}    ${response['body']}
    Log    Json Schema Validation OK
      
@@ -157,14 +156,14 @@ Check Postcondition VNF Is Configured
    Get VNF configuration
    ${input_file}=    Get File    jsons/vnfConfigModifications.json
    ${input}=    evaluate    json.loads('''${input_file}''')    json
    Should Be Equal  ${response['body']}    ${input} 
    Should Be Equal As Strings  ${response['body']}    ${input} 

Send Duplicated VNF configuration
    Depends On Test    Send VNF configuration    # If the previous test scceeded, it means that Etag has been modified
    log    Trying to perform a PATCH. This method modifies an individual alarm resource
    Set Headers  {"Accept":"${ACCEPT}"}
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Set Headers    {"If-Match": "${etag[0]}"}
    Set Headers    {"If-Match": "${etag}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ${body}=    Get File    jsons/vnfConfigModifications.json
    Patch    ${apiRoot}/${apiName}/${apiVersion}/configuration    ${body}
+1 −1
Changes for SOL002/VNFFaultManagement-API/environment/variables.txt: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ ${apiName} vnffm
${apiVersion}     v1
${CONTENT_TYPE}    application/json

${VNFM_DUPLICATION}    0
${VNFM_ALLOWS_DUPLICATE_SUBS}    0

${alarmId}    6fc3539c-e602-4afa-8e13-962fb5a7d81d
${etags}    a modified etag
+2 −2
Changes for SOL002/VNFFaultManagement-API/Subscriptions.robot: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ Create a new Subscription - DUPLICATION
    ...    Applicability: the VNFM allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists
    ...    Post-Conditions: 
    Log    Trying to create a subscription with an already created content
    Pass Execution If    ${VNFM_DUPLICATION} == 0    NVFO is not permitting duplication. Skipping the test
    Pass Execution If    ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0    NVFO is not permitting duplication. Skipping the test
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
@@ -65,7 +65,7 @@ Create a new Subscription - NO-DUPLICATION
    ...    Applicability: the VNFM decides to not create a duplicate subscription resource 
    ...    Post-Conditions:
    Log    Trying to create a subscription with an already created content
    Pass Execution If    ${VNFM_DUPLICATION} == 1    VNFM permits duplication. Skipping the test
    Pass Execution If    ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1    VNFM permits duplication. Skipping the test
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
+1 −1
Changes for SOL002/VNFIndicator-API/environment/vnfIndicators.txt: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -2,4 +2,4 @@
${POS_FIELDS}     name=vnfIndicator&vnfInstanceId=80b0deba-c398-445b-bef0-ac0fe733e3d0
${NEG_FIELDS}     wrongName=wrongValue
${response}       some_response_object
${vnfIndicators}  original_vnf_indicators
${vnfIndicators}  
Loading
Loading