Leonardo Bellini | 4dfc5ca | 2018-03-01 10:56:57 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Library OperatingSystem |
| 3 | Library RequestsLibrary |
| 4 | Library json |
| 5 | |
| 6 | *** Variables *** |
| 7 | ${MESSAGE} {"ping": "ok"} |
| 8 | |
| 9 | #global variables |
| 10 | ${generatedAID} |
| 11 | |
| 12 | *** Test Cases *** |
Leonardo Bellini | de47fd4 | 2018-03-07 12:07:30 -0600 | [diff] [blame] | 13 | Check Cassandra Docker Container |
| 14 | [Documentation] It checks cassandra docker container is running |
| 15 | ${rc} ${output}= Run and Return RC and Output docker ps |
| 16 | Log To Console ********************* |
| 17 | Log To Console retrurn_code = ${rc} |
| 18 | Log To Console output = ${output} |
| 19 | Should Be Equal As Integers ${rc} 0 |
| 20 | Should Contain ${output} music-db |
| 21 | |
| 22 | Check Zookeeper Docker Container |
| 23 | [Documentation] It checks zookeeper docker container is running |
| 24 | ${rc} ${output}= Run and Return RC and Output docker ps |
| 25 | Log To Console ********************* |
| 26 | Log To Console retrurn_code = ${rc} |
| 27 | Log To Console output = ${output} |
| 28 | Should Be Equal As Integers ${rc} 0 |
| 29 | Should Contain ${output} music-zk |
| 30 | |
| 31 | Check Tomcat Docker Container |
| 32 | [Documentation] It checks tomcat docker container is running |
| 33 | ${rc} ${output}= Run and Return RC and Output docker ps |
| 34 | Log To Console ********************* |
| 35 | Log To Console retrurn_code = ${rc} |
| 36 | Log To Console output = ${output} |
| 37 | Should Be Equal As Integers ${rc} 0 |
| 38 | Should Contain ${output} music-tomcat |
| 39 | |
| 40 | Check Music War Docker Container |
| 41 | [Documentation] It checks music.war docker container is running |
| 42 | ${rc} ${output}= Run and Return RC and Output docker ps |
| 43 | Log To Console ********************* |
| 44 | Log To Console retrurn_code = ${rc} |
| 45 | Log To Console output = ${output} |
| 46 | Should Be Equal As Integers ${rc} 0 |
| 47 | Should Contain ${output} music-war |
| 48 | |
Leonardo Bellini | 4dfc5ca | 2018-03-01 10:56:57 -0600 | [diff] [blame] | 49 | Get Music Version |
| 50 | [Documentation] It sends a REST GET request to retrieve the Music.war version |
| 51 | Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} |
| 52 | &{headers}= Create Dictionary Content-Type=application/json Accept=application/json |
| 53 | ${resp}= Get Request musicaas /MUSIC/rest/v2/version headers=${headers} |
| 54 | Log To Console ********************* |
| 55 | Log To Console response = ${resp} |
| 56 | Log To Console body = ${resp.text} |
| 57 | Should Be Equal As Integers ${resp.status_code} 200 |
| 58 | |
Leonardo Bellini | 4dfc5ca | 2018-03-01 10:56:57 -0600 | [diff] [blame] | 59 | |
| 60 | *** Keywords *** |
| 61 | |