aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--csit/resources/tests/clamp-slas.robot57
-rwxr-xr-xcsit/run-k8s-csit.sh2
-rwxr-xr-xcsit/run-project-csit.sh4
3 files changed, 60 insertions, 3 deletions
diff --git a/csit/resources/tests/clamp-slas.robot b/csit/resources/tests/clamp-slas.robot
new file mode 100644
index 00000000..71656e4e
--- /dev/null
+++ b/csit/resources/tests/clamp-slas.robot
@@ -0,0 +1,57 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+Resource ${CURDIR}/common-library.robot
+
+*** Keywords ***
+ValidateResponseTimeForClamp
+ [Arguments] ${uri} ${method}
+ [Documentation] Check if uri response is under the 1500ms required time for clamp metrics
+ ValidateResponseTime acm-metrics ${uri} ${method} 1500
+
+*** 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
+ ValidateResponseTimeForClamp /health GET
+
+ValidateResponseTimeQueryAcDefinition
+ [Documentation] Validate query AC Definitions response time
+ ValidateResponseTimeForClamp /v2/compositions/{compositionId} GET
+
+ValidateResponseTimeQueryAcInstance
+ [Documentation] Validate query AC instance response time
+ ValidateResponseTimeForClamp /v2/compositions/{compositionId}/instances/{instanceId} GET
+
+ValidateResponseTimeQueryAcInstances
+ [Documentation] Validate query all AC instances response time
+ ValidateResponseTimeForClamp /v2/compositions/{compositionId}/instances GET
+
+ValidateResponseTimeStateChange
+ [Documentation] Validate AC instance StateChange response time
+ ValidateResponseTimeForClamp /v2/compositions/{compositionId}/instances/{instanceId} PUT
+
+ValidateResponseTimeCallParticipants
+ [Documentation] Validate call AC participants response time
+ ValidateResponseTimeForClamp /v2/participants PUT
+
+ValidateResponseTimeCommissioning
+ [Documentation] Validate commission AC Definitions response time
+ ValidateResponseTimeForClamp /v2/compositions POST
+
+ValidateResponseTimeInstantiation
+ [Documentation] Validate create AC Instance response time
+ ValidateResponseTimeForClamp /v2/compositions/{compositionId}/instances POST
+
+ValidateResponseTimeDeleteInstance
+ [Documentation] Validate delete AC Instance response time
+ ValidateResponseTimeForClamp /v2/compositions/{compositionId}/instances/{instanceId} DELETE
+
+ValidateResponseTimeDeleteDefinition
+ [Documentation] Validate delete AC Definition response time
+ ValidateResponseTimeForClamp /v2/compositions/{compositionId} DELETE \ No newline at end of file
diff --git a/csit/run-k8s-csit.sh b/csit/run-k8s-csit.sh
index b578a5b0..eaaa8b48 100755
--- a/csit/run-k8s-csit.sh
+++ b/csit/run-k8s-csit.sh
@@ -28,7 +28,7 @@ export GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' "${WORKSPACE
CSIT_SCRIPT="scripts/run-test.sh"
ROBOT_DOCKER_IMAGE="policy-csit-robot"
-POLICY_CLAMP_ROBOT="policy-clamp-test.robot"
+POLICY_CLAMP_ROBOT="policy-clamp-test.robot clamp-slas.robot"
POLICY_API_ROBOT="api-test.robot api-slas.robot"
POLICY_PAP_ROBOT="pap-test.robot pap-slas.robot"
POLICY_APEX_PDP_ROBOT="apex-pdp-test.robot apex-slas.robot"
diff --git a/csit/run-project-csit.sh b/csit/run-project-csit.sh
index 8d467ade..cbb62e6d 100755
--- a/csit/run-project-csit.sh
+++ b/csit/run-project-csit.sh
@@ -41,8 +41,8 @@ function docker_stats(){
}
function setup_clamp() {
- export ROBOT_FILES="policy-clamp-test.robot"
- source "${WORKSPACE}"/compose/start-compose.sh policy-clamp-runtime-acm
+ export ROBOT_FILES="policy-clamp-test.robot clamp-slas.robot"
+ source "${WORKSPACE}"/compose/start-compose.sh policy-clamp-runtime-acm --grafana
sleep 30
bash "${SCRIPTS}"/wait_for_rest.sh localhost "${ACM_PORT}"
}