Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Library RequestsLibrary |
| 3 | Library Process |
| 4 | |
| 5 | *** Variables *** |
| 6 | |
| 7 | ${cli_exec} docker exec cli onap |
jitendra sharma | 3f19647 | 2020-10-22 10:48:33 +0000 | [diff] [blame] | 8 | ${cli_exec_cli_10_version} docker exec cli bash -c "export OPEN_CLI_PRODUCT_IN_USE=open-cli && onap --version" |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 9 | |
| 10 | *** Test Cases *** |
| 11 | Liveness Test |
| 12 | [Documentation] Check cli liveness check |
jitendra sharma | 3f19647 | 2020-10-22 10:48:33 +0000 | [diff] [blame] | 13 | Create Session cli https://${CLI_IP}:443 |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 14 | CheckUrl cli / |
| 15 | |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 16 | Check Cli Version Default |
| 17 | [Documentation] check cli default version |
| 18 | ${cli_cmd_output}= Run Process ${cli_exec_cli_10_version} shell=yes |
| 19 | Log ${cli_cmd_output.stdout} |
| 20 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
jitendra sharma | 3f19647 | 2020-10-22 10:48:33 +0000 | [diff] [blame] | 21 | Should Contain ${cli_cmd_output.stdout} : open-cli |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 22 | |
| 23 | |
| 24 | *** Keywords *** |
| 25 | CheckUrl |
| 26 | [Arguments] ${session} ${path} |
| 27 | ${resp}= Get Request ${session} ${path} |
| 28 | Should Be Equal As Integers ${resp.status_code} 200 |