blob: 4af4ebc0dbb47309a80beebdca4828d722ca8e5a [file] [log] [blame]
Leonardo Bellini4dfc5ca2018-03-01 10:56:57 -06001*** Settings ***
2Library OperatingSystem
3Library RequestsLibrary
4Library json
5
6*** Variables ***
7${MESSAGE} {"ping": "ok"}
8
9#global variables
10${generatedAID}
11
12*** Test Cases ***
Leonardo Bellinide47fd42018-03-07 12:07:30 -060013Check 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
22Check 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
31Check 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
40Check 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 Bellini4dfc5ca2018-03-01 10:56:57 -060049Get 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 Bellini4dfc5ca2018-03-01 10:56:57 -060059
60*** Keywords ***
61