diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2017-11-02 16:15:54 -0700 |
---|---|---|
committer | Gary Wu <gary.i.wu@huawei.com> | 2017-11-02 16:16:14 -0700 |
commit | 56d962fc11dc14c1f8f4232a6672536bd3bcc1b8 (patch) | |
tree | dd51141c5a6878998dd3f2b55f30edd159add310 /robot/resources/dcae_interface.robot | |
parent | 0630cdc720d3d19ee2cc98fa788a3fb383f1d252 (diff) |
Support regex in DCAE healthcheck service names
Change-Id: Ie38a44a800f0a12947749cbd6805e2f261ece957
Issue-ID: INT-320
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'robot/resources/dcae_interface.robot')
-rw-r--r-- | robot/resources/dcae_interface.robot | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/robot/resources/dcae_interface.robot b/robot/resources/dcae_interface.robot index bb486ef2..8cf9f211 100644 --- a/robot/resources/dcae_interface.robot +++ b/robot/resources/dcae_interface.robot @@ -26,29 +26,20 @@ Run DCAE Health Check Check DCAE Results [Documentation] Parse DCAE JSON response and make sure all rows have healthTestStatus=GREEN (except for the exceptions ;-) [Arguments] ${json} - ${service_names}= Get DCAE Healthcheck Service Names - :for ${service} in @{json} - \ ${sn}= Get From DIctionary ${service} ServiceName - \ ${status}= Get From Dictionary ${service} Status - \ Run Keyword If '${status}'=='passing' Remove Values From List ${service_names} ${sn} - Should Be Empty ${service_names} Services failing healthcheck ${service_names} - - -Get DCAE Healthcheck Service Names - [Documentation] From Lusheng's email servaices that must be passing for DCAE to be healthy. Mayne grab from a config file? - ${service_names}= Create List - Append To List ${service_names} cdap - Append To List ${service_names} cdap_broker - Append To List ${service_names} config_binding_service - Append To List ${service_names} deployment_handler - Append To List ${service_names} inventory - Append To List ${service_names} service_change_handler - Append To List ${service_names} policy_handler - Append To List ${service_names} platform_dockerhost - Append To List ${service_names} component_dockerhost - Append To List ${service_names} cloudify_manager - Append To List ${service_names} VES - Append To List ${service_names} TCA - Append To List ${service_names} Holmes + # ${service_names} to contain only the names of services that are passing + ${service_names}= Evaluate map( lambda s: s['ServiceName'], filter(lambda s: s['Status'] == 'passing', ${json} )) + Should Contain Match ${service_names} cdap + Should Contain Match ${service_names} cdap_broker + Should Contain Match ${service_names} config_binding_service + Should Contain Match ${service_names} deployment_handler + Should Contain Match ${service_names} inventory + Should Contain Match ${service_names} service_change_handler + Should Contain Match ${service_names} policy_handler + Should Contain Match ${service_names} platform_dockerhost + Should Contain Match ${service_names} component_dockerhost + Should Contain Match ${service_names} cloudify_manager + Should Contain Match ${service_names} VES + Should Contain Match ${service_names} TCA + Should Contain Match ${service_names} regexp=.*holmes [Return] ${service_names} |