blob: 055b99af9a010924a02a773ae51b34189d59bafc [file] [log] [blame]
eh552t10d13032017-09-15 14:47:45 +02001*** Settings ***
2Library Collections
3Library RequestsLibrary
4Library OperatingSystem
5Library json
6
7
8*** Test Cases ***
9Get 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
eh552t67c43e62017-10-03 17:18:00 +020014Put Requests to add Holmes template1 without properties
eh552t10d13032017-09-15 14:47:45 +020015 ${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
eh552t67c43e62017-10-03 17:18:00 +020022Put Requests to add Holmes template2 without properties
eh552t10d13032017-09-15 14:47:45 +020023 ${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
30Get 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
eh552tb1a9fa72017-09-27 16:42:56 +020039Put Requests to add Close Loop Holmes Model1
40 ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99
41 Create Session clamp http://localhost:8080 auth=${auth}
42 ${data}= Get Binary File ${CURDIR}${/}data${/}createHolmesModel1.json
43 &{headers}= Create Dictionary Content-Type=application/json
44 ${resp}= Put Request clamp /restservices/clds/v1/clds/model/HolmesModel1 data=${data} headers=${headers}
45 Should Be Equal As Strings ${resp.status_code} 200
46
47Get Requests verify Holmes Model1 found
48 ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99
49 Create Session clamp http://localhost:8080 auth=${auth}
50 ${resp}= Get Request clamp /restservices/clds/v1/clds/model-names
51 Should Be Equal As Strings ${resp.status_code} 200
52 Should Contain Match ${resp} *HolmesModel1*
53 Should Not Contain Match ${resp} *HolmesModel99*