3 Library RequestsLibrary
4 Library OperatingSystem
13 ${auth}= Create List ${login} ${passw}
14 Create Session clamp https://localhost:8443 auth=${auth} disable_warnings=1
15 Set Global Variable ${clamp_session} clamp
18 Get Requests health check ok
20 ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck
21 Should Be Equal As Strings ${resp.status_code} 200
23 Get Requests verify test template found
24 ${resp}= Get Request ${clamp_session} /restservices/clds/v1/cldsTempate/template-names
25 Should Be Equal As Strings ${resp.status_code} 200
26 Should Contain Match ${resp} *templateHolmes1*
27 Should Contain Match ${resp} *templateHolmes2*
28 Should Not Contain Match ${resp} *templateHolmes99*
30 Put Requests to add Close Loop ClHolmes1
31 ${data}= Get Binary File ${CURDIR}${/}data${/}createClHolmes1.json
32 &{headers}= Create Dictionary Content-Type=application/json
33 ${resp}= Put Request ${clamp_session} /restservices/clds/v1/clds/model/ClHolmes1 data=${data} headers=${headers}
34 Should Be Equal As Strings ${resp.status_code} 200
36 Put Requests to add Close Loop ClHolmes2
37 ${data}= Get Binary File ${CURDIR}${/}data${/}createClHolmes2.json
38 &{headers}= Create Dictionary Content-Type=application/json
39 ${resp}= Put Request ${clamp_session} /restservices/clds/v1/clds/model/ClHolmes2 data=${data} headers=${headers}
40 Should Be Equal As Strings ${resp.status_code} 200
42 Get Requests verify CL1 found
43 ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model-names
44 Should Be Equal As Strings ${resp.status_code} 200
45 Should Contain Match ${resp} *ClHolmes1*
46 Should Contain Match ${resp} *ClHolmes2*
47 Should Not Contain Match ${resp} *ClHolmes99*