pdragosh | 3f9a096 | 2019-04-16 13:19:45 -0400 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Library Collections |
| 3 | Library RequestsLibrary |
| 4 | Library OperatingSystem |
| 5 | Library json |
| 6 | |
| 7 | *** Test Cases *** |
| 8 | Alive |
| 9 | [Documentation] Runs Policy PDP Alive Check |
| 10 | ${auth}= Create List demo@people.osaaf.org demo123456! |
| 11 | Log Creating session https://${POLICY_DROOLS_IP}:9696 |
| 12 | ${session}= Create Session policy https://${POLICY_DROOLS_IP}:9696 auth=${auth} |
| 13 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json |
| 14 | ${resp}= Get Request policy /policy/pdp/engine headers=${headers} |
| 15 | Log Received response from policy ${resp.text} |
| 16 | Should Be Equal As Strings ${resp.status_code} 200 |
| 17 | Should Be Equal As Strings ${resp.json()['alive']} True |
a.sreekumar | 2070574 | 2020-02-14 12:03:33 +0000 | [diff] [blame] | 18 | |
| 19 | Healthcheck |
| 20 | [Documentation] Runs Policy PDP-D Health check |
| 21 | ${auth}= Create List demo@people.osaaf.org demo123456! |
| 22 | Log Creating session https://${POLICY_DROOLS_IP}:6969/healthcheck |
| 23 | ${session}= Create Session policy https://${POLICY_DROOLS_IP}:6969 auth=${auth} |
| 24 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json |
| 25 | ${resp}= Get Request policy /healthcheck headers=${headers} |
| 26 | Log Received response from policy ${resp.text} |
| 27 | Should Be Equal As Strings ${resp.status_code} 200 |
| 28 | Should Be Equal As Strings ${resp.json()['healthy']} True |
| 29 | |
Jim Hahn | d248ae9 | 2020-03-17 12:18:46 -0400 | [diff] [blame] | 30 | Frankfurt |
| 31 | [Documentation] Checks frankfurt controller is up |
| 32 | ${auth}= Create List demo@people.osaaf.org demo123456! |
| 33 | Log Creating session https://${POLICY_DROOLS_IP}:9696 |
| 34 | ${session}= Create Session policy https://${POLICY_DROOLS_IP}:9696 auth=${auth} |
| 35 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json |
| 36 | ${resp}= Get Request policy /policy/pdp/engine/controllers/frankfurt/drools/facts headers=${headers} |
| 37 | Log Received response from policy ${resp.text} |
| 38 | Should Be Equal As Strings ${resp.status_code} 200 |
| 39 | Should Be Equal As Strings ${resp.json()['frankfurt']} 0 |
| 40 | |
a.sreekumar | 2070574 | 2020-02-14 12:03:33 +0000 | [diff] [blame] | 41 | Usecases |
| 42 | [Documentation] Checks usecases controller is up |
| 43 | ${auth}= Create List demo@people.osaaf.org demo123456! |
| 44 | Log Creating session https://${POLICY_DROOLS_IP}:9696 |
| 45 | ${session}= Create Session policy https://${POLICY_DROOLS_IP}:9696 auth=${auth} |
| 46 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json |
| 47 | ${resp}= Get Request policy /policy/pdp/engine/controllers/usecases/drools/facts headers=${headers} |
| 48 | Log Received response from policy ${resp.text} |
| 49 | Should Be Equal As Strings ${resp.status_code} 200 |
| 50 | Should Be Equal As Strings ${resp.json()['usecases']} 0 |
| 51 | |