Library RequestsLibrary
Variables ../../../variables/Variables.py
Resource ../../../libraries/Utils.robot
+Resource ../../../libraries/TemplatedRequests.robot
*** Test Cases ***
Put Service Nodes
${jsonbody} To Json ${body}
${nodes} Get From Dictionary ${jsonbody} service-nodes
${resp} RequestsLibrary.Get Request session ${SERVICE_NODES_URI}
- Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
${result} To JSON ${resp.content}
${node} Get From Dictionary ${result} service-nodes
Lists Should be Equal ${node} ${nodes}
[Documentation] Delete all Service Nodes
Add Elements To URI From File ${SERVICE_NODES_URI} ${SERVICE_NODES_FILE}
${resp} RequestsLibrary.Get Request session ${SERVICE_NODES_URI}
- Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
Remove All Elements At URI ${SERVICE_NODES_URI}
${resp} RequestsLibrary.Get Request session ${SERVICE_NODES_URI}
Should Be Equal As Strings ${resp.status_code} 404
Add Elements To URI From File ${SERVICE_NODES_URI} ${SERVICE_NODES_FILE}
Remove All Elements At URI ${SERVICE_NODES_URI}service-node/node-101
${resp} RequestsLibrary.Get Request session ${SERVICE_NODES_URI}
- Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
Should Not Contain ${resp.content} node-101
Delete A Non-existing Service Node
${nodes} Get From Dictionary ${jsonbody} service-nodes
Remove All Elements At URI ${SERVICE_NODES_URI}service-node/non-existing-sn
${resp} RequestsLibrary.Get Request session ${SERVICE_NODES_URI}
- Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
${result} To JSON ${resp.content}
${node} Get From Dictionary ${result} service-nodes
Lists Should be Equal ${node} ${nodes}