Suchitra Vemuri | f7410a9 | 2017-05-16 17:04:05 -0700 | [diff] [blame] | 1 | *** Settings *** |
Kailash Khalasi | 86e231e | 2017-06-06 13:13:43 -0700 | [diff] [blame] | 2 | Documentation Test suite for checking default images |
Suchitra Vemuri | f7410a9 | 2017-05-16 17:04:05 -0700 | [diff] [blame] | 3 | Suite Setup Read InputFile |
| 4 | Test Template Verify Image Check |
| 5 | Library Collections |
| 6 | Library String |
| 7 | Library OperatingSystem |
| 8 | Library XML |
| 9 | Library RequestsLibrary |
Zack Williams | 821c502 | 2020-01-15 15:11:46 -0700 | [diff] [blame^] | 10 | Library CORDRobot |
| 11 | Library ImportResource resources=CORDRobot |
Suchitra Vemuri | f7410a9 | 2017-05-16 17:04:05 -0700 | [diff] [blame] | 12 | |
| 13 | *** Variables *** |
Kailash Khalasi | 86e231e | 2017-06-06 13:13:43 -0700 | [diff] [blame] | 14 | ${PROFILE} mock-rcord |
You Wang | 898067f | 2018-01-04 15:08:22 -0800 | [diff] [blame] | 15 | ${PROFILE_FILE} ${CURDIR}/../../../../../../orchestration/profiles/${PROFILE}/${PROFILE}.yml |
Suchitra Vemuri | f7410a9 | 2017-05-16 17:04:05 -0700 | [diff] [blame] | 16 | ${PATHFILE} ${CURDIR}/data/defaultImages.json |
| 17 | |
| 18 | *** Test Cases *** TYPE |
Kailash Khalasi | 86e231e | 2017-06-06 13:13:43 -0700 | [diff] [blame] | 19 | Test Default Images |
Suchitra Vemuri | f7410a9 | 2017-05-16 17:04:05 -0700 | [diff] [blame] | 20 | IMAGE |
| 21 | |
| 22 | *** Keywords *** |
| 23 | Read InputFile |
Zack Williams | 821c502 | 2020-01-15 15:11:46 -0700 | [diff] [blame^] | 24 | ${defaultImageList}= CORDRobot.jsonToList ${PATHFILE} imagesInfo |
| 25 | ${status} ${dynamicImageList}= Run Keyword And Ignore Error CORDRobot.get_dynamic_resources ${PROFILE_FILE} xos_images |
Kailash Khalasi | 86e231e | 2017-06-06 13:13:43 -0700 | [diff] [blame] | 26 | ${imageList}= Set Variable If '${status}' == 'FAIL' ${defaultImageList} ${dynamicImageList} |
| 27 | Set Suite Variable ${imageList} |
Suchitra Vemuri | f7410a9 | 2017-05-16 17:04:05 -0700 | [diff] [blame] | 28 | |
| 29 | Verify Image Check |
| 30 | [Arguments] ${type} |
| 31 | Run Keyword If "${type}" == "IMAGE" Test Image Check |
| 32 | |
| 33 | Test Image Check |
Zack Williams | 821c502 | 2020-01-15 15:11:46 -0700 | [diff] [blame^] | 34 | ${json_result}= CORDRobot.ApiGet CH_CORE_IMAGES |
Suchitra Vemuri | f7410a9 | 2017-05-16 17:04:05 -0700 | [diff] [blame] | 35 | ${json_result_list}= Get From Dictionary ${json_result} items |
| 36 | Log ${json_result_list} |
Kailash Khalasi | 86e231e | 2017-06-06 13:13:43 -0700 | [diff] [blame] | 37 | ${image_list}= Get Variable Value ${imageList} |
Zack Williams | 821c502 | 2020-01-15 15:11:46 -0700 | [diff] [blame^] | 38 | ${test_result}= CORDRobot.compare_list_of_dicts ${image_list} ${json_result_list} |
Suchitra Vemuri | f7410a9 | 2017-05-16 17:04:05 -0700 | [diff] [blame] | 39 | Should Be True ${test_result} |
Kailash Khalasi | 86e231e | 2017-06-06 13:13:43 -0700 | [diff] [blame] | 40 | |