blob: 59341d26d01ca2093afb003b5dd42a93f589b6e7 [file] [log] [blame]
You Wang3964e842016-12-09 12:04:32 -08001*** Settings ***
You Wangebdf53e2017-01-03 16:34:29 -08002Documentation Test suite for checking default services
You Wang3964e842016-12-09 12:04:32 -08003Suite Setup Read InputFile
4Test Template Verify Service Sanity
5Library Collections
6Library String
7Library OperatingSystem
8Library XML
9Library RequestsLibrary
10Library ../Framework/utils/utils.py
11Library ../Framework/restApi.py
12
13*** Variables ***
14${USER} admin
15${PASSWORD} admin
16${PATHFILE} ${CURDIR}/data/defaultServices.json
17
18*** Test Cases *** TYPE
19Test Service Sanity SANITY
20
21*** Keywords ***
22Read InputFile
23 ${serviceList}= utils.jsonToList ${PATHFILE} ServiceInfo
24 Set Suite Variable ${slist} ${serviceList}
25
26Verify Service Sanity
27 [Arguments] ${type}
28 Run Keyword If "${type}" == "SANITY" Test Service Sanity
29
30Test Service Sanity
31 ${json_result}= restApi.ApiGet CORE_SERVICES
32 Log ${json_result}
33 ${serviceList}= Get Variable Value ${slist}
34 ${test_result}= utils.compare_list_of_dicts ${serviceList} ${json_result}
35 Should Be True ${test_result}