diff options
author | Chenfei Gao <cgao@research.att.com> | 2019-02-06 20:45:10 -0500 |
---|---|---|
committer | Chenfei Gao <cgao@research.att.com> | 2019-02-06 20:45:28 -0500 |
commit | d4c5185856445e873485c6ae0b7e660ef47ae635 (patch) | |
tree | 57063ce2ac069680a148319285752592aa845f63 /tests | |
parent | beebb966c899819159d6a7bf57a146cc6ad844f5 (diff) |
Add csit test plans for policy-api
Includes:
1) Added setup, teardown scripts and test plan
2) Added test robot including test cases
Issue-ID: POLICY-1270
Change-Id: Id4fe5527609d9e13906d02bccc4ae8bc7c364bd9
Signed-off-by: Chenfei Gao <cgao@research.att.com>
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 |