blob: e9b630f72575411206adc284ed0570ec0b8991a6 [file] [log] [blame]
eh552t9c0b4682017-08-21 11:10:11 +02001*** Settings ***
2Library Collections
3Library RequestsLibrary
4Library OperatingSystem
5Library json
6Library HttpLibrary.HTTP
7
8
9*** Test Cases ***
10Get Requests health check ok
11 CreateSession clamp http://localhost:8080
12 ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck
13 Should Be Equal As Strings ${resp.status_code} 200
14
15Put Requests to add template1 with yaml properties
16 ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99
17 Create Session clamp http://localhost:8080 auth=${auth}
18 ${data}= Get Binary File ${CURDIR}${/}data${/}createTemplate1.json
19 &{headers}= Create Dictionary Content-Type=application/json
20 ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/template1 data=${data} headers=${headers}
21 Should Be Equal As Strings ${resp.status_code} 200
22
23Put Requests to add template2 with yaml properties
24 ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99
25 Create Session clamp http://localhost:8080 auth=${auth}
26 ${data}= Get Binary File ${CURDIR}${/}data${/}createTemplate2.json
27 &{headers}= Create Dictionary Content-Type=application/json
28 ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/template2 data=${data} headers=${headers}
29 Should Be Equal As Strings ${resp.status_code} 200
30
31Get Requests verify template1 and template2 found
32 ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99
33 Create Session clamp http://localhost:8080 auth=${auth}
34 ${resp}= Get Request clamp /restservices/clds/v1/cldsTempate/template-names
35 Should Be Equal As Strings ${resp.status_code} 200
36 Should Contain Match ${resp} *template1*
37 Should Contain Match ${resp} *template2*
38 Should Not Contain Match ${resp} *template99*