eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame^] | 1 | *** Settings *** |
| 2 | Library Collections |
| 3 | Library RequestsLibrary |
| 4 | Library OperatingSystem |
| 5 | Library json |
| 6 | |
| 7 | |
| 8 | *** Test Cases *** |
| 9 | Get Requests health check ok |
| 10 | CreateSession clamp http://localhost:8080 |
| 11 | ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck |
| 12 | Should Be Equal As Strings ${resp.status_code} 200 |
| 13 | |
| 14 | Put Requests to add Holmes template1 with yaml properties |
| 15 | ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 |
| 16 | Create Session clamp http://localhost:8080 auth=${auth} |
| 17 | ${data}= Get Binary File ${CURDIR}${/}data${/}createHolmesTemplate1.json |
| 18 | &{headers}= Create Dictionary Content-Type=application/json |
| 19 | ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/HolmesTemplate1 data=${data} headers=${headers} |
| 20 | Should Be Equal As Strings ${resp.status_code} 200 |
| 21 | |
| 22 | Put Requests to add Holmes template2 with yaml properties |
| 23 | ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 |
| 24 | Create Session clamp http://localhost:8080 auth=${auth} |
| 25 | ${data}= Get Binary File ${CURDIR}${/}data${/}createHolmesTemplate2.json |
| 26 | &{headers}= Create Dictionary Content-Type=application/json |
| 27 | ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/HolmesTemplate2 data=${data} headers=${headers} |
| 28 | Should Be Equal As Strings ${resp.status_code} 200 |
| 29 | |
| 30 | Get Requests verify Holmes template1 and template2 found |
| 31 | ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 |
| 32 | Create Session clamp http://localhost:8080 auth=${auth} |
| 33 | ${resp}= Get Request clamp /restservices/clds/v1/cldsTempate/template-names |
| 34 | Should Be Equal As Strings ${resp.status_code} 200 |
| 35 | Should Contain Match ${resp} *HolmesTemplate1* |
| 36 | Should Contain Match ${resp} *HolmesTemplate2* |
| 37 | Should Not Contain Match ${resp} *HolmesTemplate99* |
| 38 | |