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 |
eh552t | 9c0b468 | 2017-08-21 11:10:11 +0200 | [diff] [blame] | 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 | |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 14 | Put Requests to add TCA template1 with yaml properties |
eh552t | 9c0b468 | 2017-08-21 11:10:11 +0200 | [diff] [blame] | 15 | ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 |
| 16 | Create Session clamp http://localhost:8080 auth=${auth} |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 17 | ${data}= Get Binary File ${CURDIR}${/}data${/}createTCATemplate1.json |
eh552t | 9c0b468 | 2017-08-21 11:10:11 +0200 | [diff] [blame] | 18 | &{headers}= Create Dictionary Content-Type=application/json |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 19 | ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/TCATemplate1 data=${data} headers=${headers} |
eh552t | 9c0b468 | 2017-08-21 11:10:11 +0200 | [diff] [blame] | 20 | Should Be Equal As Strings ${resp.status_code} 200 |
| 21 | |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 22 | Put Requests to add TCA template2 with yaml properties |
eh552t | 9c0b468 | 2017-08-21 11:10:11 +0200 | [diff] [blame] | 23 | ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 |
| 24 | Create Session clamp http://localhost:8080 auth=${auth} |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 25 | ${data}= Get Binary File ${CURDIR}${/}data${/}createTCATemplate2.json |
eh552t | 9c0b468 | 2017-08-21 11:10:11 +0200 | [diff] [blame] | 26 | &{headers}= Create Dictionary Content-Type=application/json |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 27 | ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/TCATemplate2 data=${data} headers=${headers} |
eh552t | 9c0b468 | 2017-08-21 11:10:11 +0200 | [diff] [blame] | 28 | Should Be Equal As Strings ${resp.status_code} 200 |
| 29 | |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 30 | Get Requests verify TCA template1 and template2 found |
eh552t | 9c0b468 | 2017-08-21 11:10:11 +0200 | [diff] [blame] | 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 |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 35 | Should Contain Match ${resp} *TCATemplate1* |
| 36 | Should Contain Match ${resp} *TCATemplate2* |
| 37 | Should Not Contain Match ${resp} *TCATemplate99* |
eh552t | edc947f | 2017-08-25 18:00:32 +0200 | [diff] [blame] | 38 | |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 39 | Put Requests to add Close Loop TCA Model1 |
eh552t | edc947f | 2017-08-25 18:00:32 +0200 | [diff] [blame] | 40 | ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 |
| 41 | Create Session clamp http://localhost:8080 auth=${auth} |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 42 | ${data}= Get Binary File ${CURDIR}${/}data${/}createTCAModel1.json |
eh552t | edc947f | 2017-08-25 18:00:32 +0200 | [diff] [blame] | 43 | &{headers}= Create Dictionary Content-Type=application/json |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 44 | ${resp}= Put Request clamp /restservices/clds/v1/clds/model/TCAModel1 data=${data} headers=${headers} |
eh552t | edc947f | 2017-08-25 18:00:32 +0200 | [diff] [blame] | 45 | Should Be Equal As Strings ${resp.status_code} 200 |
| 46 | |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 47 | Put Requests to add Close Loop TCA Model2 |
eh552t | edc947f | 2017-08-25 18:00:32 +0200 | [diff] [blame] | 48 | ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 |
| 49 | Create Session clamp http://localhost:8080 auth=${auth} |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 50 | ${data}= Get Binary File ${CURDIR}${/}data${/}createTCAModel2.json |
eh552t | edc947f | 2017-08-25 18:00:32 +0200 | [diff] [blame] | 51 | &{headers}= Create Dictionary Content-Type=application/json |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 52 | ${resp}= Put Request clamp /restservices/clds/v1/clds/model/TCAModel2 data=${data} headers=${headers} |
eh552t | edc947f | 2017-08-25 18:00:32 +0200 | [diff] [blame] | 53 | Should Be Equal As Strings ${resp.status_code} 200 |
| 54 | |
| 55 | Get Requests verify Model1 and Model2 found |
| 56 | ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 |
| 57 | Create Session clamp http://localhost:8080 auth=${auth} |
| 58 | ${resp}= Get Request clamp /restservices/clds/v1/clds/model-names |
| 59 | Should Be Equal As Strings ${resp.status_code} 200 |
eh552t | 10d1303 | 2017-09-15 14:47:45 +0200 | [diff] [blame] | 60 | Should Contain Match ${resp} *TCAModel1* |
| 61 | Should Contain Match ${resp} *TCAModel2* |
| 62 | Should Not Contain Match ${resp} *TCAModel99* |