3 Library RequestsLibrary
4 Library OperatingSystem
12 Get Requests health check ok
13 ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck
14 Should Be Equal As Strings ${resp.status_code} 200
16 Get Requests verify test template found
17 ${resp}= Get Request ${clamp_session} /restservices/clds/v1/cldsTempate/template-names
18 Should Be Equal As Strings ${resp.status_code} 200
19 Should Contain Match ${resp} *templateTCA1*
20 Should Contain Match ${resp} *CA2*
21 Should Not Contain Match ${resp} *templateTCA99*
23 Put Requests to add Close Loop ClHolmes1
24 ${data}= Get Binary File ${CURDIR}${/}data${/}createClTCA1.json
25 &{headers}= Create Dictionary Content-Type=application/json
26 ${resp}= Put Request ${clamp_session} /restservices/clds/v1/clds/model/ClTCA1 data=${data} headers=${headers}
27 Should Be Equal As Strings ${resp.status_code} 200
29 Put Requests to add Close Loop ClHolmes2
30 ${data}= Get Binary File ${CURDIR}${/}data${/}createClTCA2.json
31 &{headers}= Create Dictionary Content-Type=application/json
32 ${resp}= Put Request ${clamp_session} /restservices/clds/v1/clds/model/ClTCA2 data=${data} headers=${headers}
33 Should Be Equal As Strings ${resp.status_code} 200
35 Get Requests verify CL1 found
36 ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model-names
37 Should Be Equal As Strings ${resp.status_code} 200
38 Should Contain Match ${resp} *ClTCA1*
39 Should Contain Match ${resp} *ClTCA2*
40 Should Not Contain Match ${resp} *ClTCA99*