blob: c5feb728775380165b2ec5649d0f791e78944d08 [file] [log] [blame]
waynedunican36806ac2023-02-24 08:44:58 +00001*** Settings ***
2Library Collections
3Library RequestsLibrary
4Library OperatingSystem
5Library json
6Resource ${CURDIR}/common-library.robot
7
8*** Keywords ***
9ValidateResponseTimeForApi
10 [Arguments] ${uri} ${method}
11 [Documentation] Check if uri response is under the 500ms required time for api metrics
12 ValidateResponseTime api-metrics ${uri} ${method} 500
13
14*** Test Cases ***
15WaitForPrometheusServer
16 [Documentation] Sleep time to wait for Prometheus server to gather all metrics
17 Sleep 1 minute
18
19ValidateResponseTimeForHealthcheck
20 [Documentation] Validate component healthcheck response time
21 ValidateResponseTimeForApi /healthcheck GET
22
23ValidateResponseTimeForStatistics
24 [Documentation] Validate statistics response time
25 ValidateResponseTimeForApi /statistics GET
26
27ValidateResponseTimeQueryPolicies
28 [Documentation] Validate query policies response time
29 ValidateResponseTimeForApi /policies GET
30
31ValidateResponseTimeQueryPolicyVersion
32 [Documentation] Validate query policy by version response time
33 ValidateResponseTimeForApi /policies/{policyId}/versions/{policyVersion} GET
34
35ValidateResponseTimeCreatePolicy
36 [Documentation] Validate response time for creating a policy
37 ValidateResponseTimeForApi /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies POST
38
39ValidateResponseTimeCreatePolicyType
40 [Documentation] Validate response time for creating a policyType
41 ValidateResponseTimeForApi /policytypes POST
42
43ValidateResponseTimeDeletePolicy
44 [Documentation] Validate response time for deletion of policies
45 ValidateResponseTimeForApi /policies/{policyId}/versions/{policyVersion} DELETE