diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2019-02-07 15:08:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-02-07 15:08:38 +0000 |
commit | 520f99e7e1284618c3149d5bd09b418c0a4197d3 (patch) | |
tree | be7c229de2c62224b69781ad0f1e8a11033fd76b /tests | |
parent | 9dbe72e59635e35f131cd7b760cd16ad959c0b68 (diff) | |
parent | d4c5185856445e873485c6ae0b7e660ef47ae635 (diff) |
Merge "Add csit test plans for policy-api"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/policy/api/api-test.robot | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/policy/api/api-test.robot b/tests/policy/api/api-test.robot new file mode 100644 index 00000000..3753b3d8 --- /dev/null +++ b/tests/policy/api/api-test.robot @@ -0,0 +1,28 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Test Cases *** +Healthcheck + [Documentation] Runs Policy Api Health check + ${auth}= Create List healthcheck zb!XztG34 + Log Creating session http://${POLICY_API_IP}:6969 + ${session}= Create Session policy http://${POLICY_API_IP}:6969 auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Get Request policy /healthcheck headers=${headers} + Log Received response from policy ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${resp.json()['code']} 200 + +Statistics + [Documentation] Runs Policy Api Statistics + ${auth}= Create List healthcheck zb!XztG34 + Log Creating session http://${POLICY_API_IP}:6969 + ${session}= Create Session policy http://${POLICY_API_IP}:6969 auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Get Request policy /statistics headers=${headers} + Log Received response from policy ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${resp.json()['code']} 200
\ No newline at end of file |