diff options
author | waynedunican <wayne.dunican@est.tech> | 2023-02-24 08:44:58 +0000 |
---|---|---|
committer | Wayne Dunican <wayne.dunican@est.tech> | 2023-02-27 08:49:19 +0000 |
commit | 36806ac304bac477a463b7eb9f8d3fb664c8b4e3 (patch) | |
tree | 6b493de6fda5b19739f2ac5f8dc22d5fc2f4644a /csit/resources/tests/api-slas.robot | |
parent | 1f339f886d01c6d6ac5cfd6467850c61fee4f675 (diff) |
Add SLA validations to API
Issue-ID: POLICY-4528
Change-Id: I517cb477bbccb36d5e2000b60450a2c015d4940b
Signed-off-by: Wayne Dunican <wayne.dunican@est.tech>
Diffstat (limited to 'csit/resources/tests/api-slas.robot')
-rw-r--r-- | csit/resources/tests/api-slas.robot | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/csit/resources/tests/api-slas.robot b/csit/resources/tests/api-slas.robot new file mode 100644 index 00000000..c5feb728 --- /dev/null +++ b/csit/resources/tests/api-slas.robot @@ -0,0 +1,45 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Resource ${CURDIR}/common-library.robot + +*** Keywords *** +ValidateResponseTimeForApi + [Arguments] ${uri} ${method} + [Documentation] Check if uri response is under the 500ms required time for api metrics + ValidateResponseTime api-metrics ${uri} ${method} 500 + +*** Test Cases *** +WaitForPrometheusServer + [Documentation] Sleep time to wait for Prometheus server to gather all metrics + Sleep 1 minute + +ValidateResponseTimeForHealthcheck + [Documentation] Validate component healthcheck response time + ValidateResponseTimeForApi /healthcheck GET + +ValidateResponseTimeForStatistics + [Documentation] Validate statistics response time + ValidateResponseTimeForApi /statistics GET + +ValidateResponseTimeQueryPolicies + [Documentation] Validate query policies response time + ValidateResponseTimeForApi /policies GET + +ValidateResponseTimeQueryPolicyVersion + [Documentation] Validate query policy by version response time + ValidateResponseTimeForApi /policies/{policyId}/versions/{policyVersion} GET + +ValidateResponseTimeCreatePolicy + [Documentation] Validate response time for creating a policy + ValidateResponseTimeForApi /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies POST + +ValidateResponseTimeCreatePolicyType + [Documentation] Validate response time for creating a policyType + ValidateResponseTimeForApi /policytypes POST + +ValidateResponseTimeDeletePolicy + [Documentation] Validate response time for deletion of policies + ValidateResponseTimeForApi /policies/{policyId}/versions/{policyVersion} DELETE
\ No newline at end of file |