Fix Get File and healthMR 70/79570/1
authorBrian Freeman <bf1936@att.com>
Sun, 3 Mar 2019 14:37:54 +0000 (09:37 -0500)
committerBrian Freeman <bf1936@att.com>
Sun, 3 Mar 2019 14:38:05 +0000 (09:38 -0500)
healthmr test case will now try to handle the first message in kafka issue
with POST, GET, POST, GET for the first messgae.
Also fixed reference to Get File as OperatingSystem.Get File to avoid conflicts with SSH Get File

Issue-ID: INT-892
Change-Id: I4924da24842c4612b8519699d9844583bb2a1207
Signed-off-by: Brian Freeman <bf1936@att.com>
robot/resources/asdc_interface.robot
robot/resources/mr_interface.robot

index 3ba4b5c..310c7fb 100644 (file)
@@ -176,7 +176,7 @@ Distribute vCPEResCust Model From ASDC
     #${brg_dict}=   Create Dictionary      invariantUUID=ff0337b9-dbe2-4d88-bb74-18bf027ae586   UUID=1b6974f1-4aed-47f4-b962-816aa1261927    node_type=org.openecomp.service.Demovcpevbrgemu
     # Create /tmp/vcpe_allotted_resource_data.json with demo vgmux and brgemu CSARs
     Create Allotted Resource Data File
-    ${vcpe_ar_data_file}    Get File    /tmp/vcpe_allotted_resource_data.json
+    ${vcpe_ar_data_file}    OperatingSystem.Get File    /tmp/vcpe_allotted_resource_data.json
     ${tunnelxconn_invariant_uuid}    Get Json Value    ${vcpe_ar_data_file}    /tunnelxconn/invariantUUID
     ${tunnelxconn_uuid}    Get Json Value    ${vcpe_ar_data_file}    /tunnelxconn/UUID
     ${tunnelxconn_node_type}    Get Json Value    ${vcpe_ar_data_file}    /tunnelxconn/node_type
@@ -318,7 +318,7 @@ Setup SDC Catalog Resource Deployment Artifact Properties
     [Arguments]    ${catalog_service_id}    ${catalog_parent_service_id}   ${catalog_resource_unique_id}  ${blueprint_file}
     ${resp}=    Get ASDC Catalog Resource Component Instances Properties  ${catalog_service_id}
     #${resp}=    Get ASDC Catalog Resource Deployment Artifact Properties  ${catalog_service_id}
-    ${blueprint_data}    Get File    ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH}${blueprint_file}
+    ${blueprint_data}    OperatingSystem.Get File    ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH}${blueprint_file}
     ${payloadData}=   Evaluate   base64.b64encode('''${blueprint_data}'''.encode('utf-8'))   modules=base64
     ${dict}=    Create Dictionary  artifactLabel=blueprint  artifactName=${blueprint_file}   artifactType=DCAE_INVENTORY_BLUEPRINT  artifactGroupType=DEPLOYMENT  description=${blueprint_file}   payloadData=${payloadData}
     ${data}=   Fill JSON Template File    ${ASDC_ARTIFACT_UPLOAD_TEMPLATE}    ${dict}
index 625198d..29e9dd3 100644 (file)
@@ -23,12 +23,16 @@ Run MR Health Check
 
 Run MR PubSub Health Check
      [Documentation]    Runs MR PubSub Health check
-     ${resp}=    Run MR Get Request    ${MR_SUB_HEALTH_CHECK_PATH}
+     #${resp}=    Run MR Get Request    ${MR_SUB_HEALTH_CHECK_PATH}
      # topic may not be created which is a 400 error
+
      ${resp}=    Run MR Post Request    ${MR_PUB_HEALTH_CHECK_PATH}
      Should Be Equal As Strings         ${resp.status_code}     200
      Should Contain    ${resp.json()}    serverTimeMs    Failed to Write Data
      ${resp}=    Run MR Get Request    ${MR_SUB_HEALTH_CHECK_PATH}
+     # Always Write twice to catch lost first message
+     ${resp}=    Run MR Post Request    ${MR_PUB_HEALTH_CHECK_PATH}
+     ${resp}=    Run MR Get Request    ${MR_SUB_HEALTH_CHECK_PATH}
      # ${resp} is an array
      Should Be Equal As Strings         ${resp.status_code}     200
      Should Contain    ${resp.json()[0]}    timestamp    Failed to Read Data