X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric_robot_suite%2Fhelm%2Fnanobot%2Fconfigmap-src%2Fpublic%2Ftestsuites%2Fhealth-check.robot;h=5e5fdba8ff43987629a603d699d58b5b80d844ef;hb=3d053f85cc9c42c57850780a18afb0eef425303c;hp=a8faacf7a97487d9ba24169554b2f1a72a8ef34c;hpb=fb793dbf21da9874a5f26dfce45c4a08f4b02889;p=it%2Ftest.git diff --git a/ric_robot_suite/helm/nanobot/configmap-src/public/testsuites/health-check.robot b/ric_robot_suite/helm/nanobot/configmap-src/public/testsuites/health-check.robot index a8faacf..5e5fdba 100644 --- a/ric_robot_suite/helm/nanobot/configmap-src/public/testsuites/health-check.robot +++ b/ric_robot_suite/helm/nanobot/configmap-src/public/testsuites/health-check.robot @@ -1,20 +1,42 @@ +# Copyright (c) 2019 AT&T Intellectual Property. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + *** Settings *** -Documentation Testing RIC components are available via calls. -... -... Testing RIC components are available via calls. -Test Timeout 10 second -Resource ../resources/appmgr/appmgr_interface.robot -Resource ../resources/e2mgr/e2mgr_interface.robot -Resource ../resources/rtmgr/rtmgr_interface.robot +Documentation Run basic health checks for all known components which have one -*** Test Cases *** -Basic AppMgr Health Check - [Tags] health - Run AppMgr Health Check -Basic E2Mgr Health Check - [Tags] health - Run E2Mgr Health Check -Basic RtMgr Health Check - [Tags] health - Run RtMgr Health Check +Resource /robot/resources/global_properties.robot +Resource /robot/resources/ric/ric_utils.robot + +*** Test Cases *** +Basic Component Health Checks + [Documentation] For any defined RIC component with a health check keyword, + ... Run that keyword. "Health check" keywords have names of the + ... form "Run ${component} Health Check". + # This could have been entirely implemented in Helm; however, I wanted to + # allow for the possibility that it would be used (with some modification) + # by the ric-robot, which does not perform template expansion on testsuites. + [Tags] health + Set Test Variable ${finalStatus} PASS + :FOR ${component} IN @{GLOBAL_RICPLT_COMPONENTS} + \ Run Keyword And Ignore Error + ... Import Resource /robot/resources/${component}/${component}_interface.robot + \ ${healthCheck} = Set Variable Run ${component} Health Check + \ ${status} = Run Keyword If Present ${healthCheck} + \ ${finalStatus} = Set Variable If '${status}' == 'FAIL' FAIL ${finalStatus} + \ Run Keyword If '${status}' == 'FAIL' + ... Log ${component} is unhealthy + Run Keyword If '${finalStatus}' == 'FAIL' + ... Fail One or more Health Checks failed