Fix CMPv2 test cases after pnf-simulator changes 31/117931/1
authorKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>
Wed, 17 Feb 2021 07:27:06 +0000 (08:27 +0100)
committerKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>
Wed, 17 Feb 2021 07:27:06 +0000 (08:27 +0100)
PNF Simulator logging has been extended, now it forwards
exception from connection to VES collector directly to
pnf simulator endpoint

Issue-ID: INT-1804
Signed-off-by: Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>
Change-Id: I653380c72b9fb02c50aa3b99a67787edfecbdc4a

robot/resources/test_templates/cmpv2.robot
robot/testsuites/cmpv2.robot

index 607a4f0..bc99ec2 100644 (file)
@@ -22,7 +22,7 @@ ${users}  ${EXECDIR}/robot/assets/cmpv2/mongo-users.json
 
 *** Keywords ***
 Pnf simulator send single VES event
-    [Arguments]  ${event}   ${ves_host}   ${ves_port}  ${pnf_sim_host}  ${pnf_sim_port}
+    [Arguments]  ${event}   ${ves_host}   ${ves_port}  ${pnf_sim_host}  ${pnf_sim_port}  ${http_reposnse_code}=202
     ${pnf_sim_endpoint}=            Set Variable                http://${pnf_sim_host}:${pnf_sim_port}
     ${ves_url}=                     Set Variable                ${GLOBAL_DCAE_VES_HTTPS_PROTOCOL}://${ves_host}:${ves_port}/${VES_data_path}
     ${single_event}=                Create Dictionary           event=${event}              ves_url=${ves_url}
@@ -33,7 +33,7 @@ Pnf simulator send single VES event
     ${headers}=                     Create Dictionary            Accept=application/json    Content-Type=application/json
     ${post_resp}=                   Post Request                pnf_sim                     ${single_event_data_path}       data=${data}        headers=${headers}
     Log                             PNF registration request ${data}
-    Should Be Equal As Strings      ${post_resp.status_code}    202
+    Should Be Equal As Strings      ${post_resp.status_code}    ${http_reposnse_code}
     Log                             VES has accepted event with status code ${post_resp.status_code}
 
 
index 12d94ca..b2f19bd 100644 (file)
@@ -110,7 +110,7 @@ Send registration request to CMPv2 VES with wrong SAN-s
     ${PNF_entry_dict}=                         Create Dictionary                   correlation_id=${pnf_correlation_id}    PNF_IPv4_address=14.14.14.14    PNF_IPv6_address=2001:0db8:0:0:0:0:1428:57ab
     Templating.Create Environment              ves                                 ${GLOBAL_TEMPLATE_FOLDER}
     ${template}=                               Templating.Apply Template           ves                                     ${pnf_ves_integration_request}   ${PNF_entry_dict}
-    Pnf simulator send single VES event        ${template}                         dcae-ves-collector-cmpv2-cert-wrong-sans      8443                             pnf-simulator              5000
+    Pnf simulator send single VES event        ${template}                         dcae-ves-collector-cmpv2-cert-wrong-sans      8443                             pnf-simulator              5000     421
     ${rc} =                                    Run and Return RC                   ${PNF_SIMULATOR_ERROR_GREP_COMMAND_SANS}
     Should Be Equal As Integers                ${rc}                               0
 
@@ -124,6 +124,6 @@ Send registration request to VES without CMPv2 certificate
     ${PNF_entry_dict}=                         Create Dictionary                   correlation_id=${pnf_correlation_id}    PNF_IPv4_address=14.14.14.14    PNF_IPv6_address=2001:0db8:0:0:0:0:1428:57ab
     Templating.Create Environment              ves                                 ${GLOBAL_TEMPLATE_FOLDER}
     ${template}=                               Templating.Apply Template           ves                                     ${pnf_ves_integration_request}   ${PNF_entry_dict}
-    Pnf simulator send single VES event        ${template}                         dcae-ves-collector           8443                             pnf-simulator              5000
+    Pnf simulator send single VES event        ${template}                         dcae-ves-collector           8443                             pnf-simulator              5000     421
     ${rc} =                                    Run and Return RC                   ${PNF_SIMULATOR_ERROR_GREP_COMMAND_CERT}
     Should Be Equal As Integers                ${rc}                               0