eh552t | 9c0b468 | 2017-08-21 11:10:11 +0200 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Library Collections |
| 3 | Library RequestsLibrary |
| 4 | Library OperatingSystem |
| 5 | Library json |
| 6 | Library HttpLibrary.HTTP |
| 7 | |
| 8 | |
| 9 | *** Test Cases *** |
| 10 | Get 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 | |
| 15 | Put 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 | |
| 23 | Put 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 | |
| 31 | Get 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* |
eh552t | edc947f | 2017-08-25 18:00:32 +0200 | [diff] [blame] | 39 | |
| 40 | Put Requests to add Close Loop Model1 |
| 41 | ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 |
| 42 | Create Session clamp http://localhost:8080 auth=${auth} |
| 43 | ${data}= Get Binary File ${CURDIR}${/}data${/}createModel1.json |
| 44 | &{headers}= Create Dictionary Content-Type=application/json |
| 45 | ${resp}= Put Request clamp /restservices/clds/v1/clds/model/Model1 data=${data} headers=${headers} |
| 46 | Should Be Equal As Strings ${resp.status_code} 200 |
| 47 | |
| 48 | Put Requests to add Close Loop Model2 |
| 49 | ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 |
| 50 | Create Session clamp http://localhost:8080 auth=${auth} |
| 51 | ${data}= Get Binary File ${CURDIR}${/}data${/}createModel2.json |
| 52 | &{headers}= Create Dictionary Content-Type=application/json |
| 53 | ${resp}= Put Request clamp /restservices/clds/v1/clds/model/Model2 data=${data} headers=${headers} |
| 54 | Should Be Equal As Strings ${resp.status_code} 200 |
| 55 | |
| 56 | Get Requests verify Model1 and Model2 found |
| 57 | ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 |
| 58 | Create Session clamp http://localhost:8080 auth=${auth} |
| 59 | ${resp}= Get Request clamp /restservices/clds/v1/clds/model-names |
| 60 | Should Be Equal As Strings ${resp.status_code} 200 |
| 61 | Should Contain Match ${resp} *Model1* |
| 62 | Should Contain Match ${resp} *Model2* |
| 63 | Should Not Contain Match ${resp} *Model99* |