Add slas tests for clamp

Issue-ID: POLICY-5028
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: Id76f19855cb1c7cdb4d9bdaf5c38cfc6fcadfa06
diff --git a/csit/resources/tests/clamp-slas.robot b/csit/resources/tests/clamp-slas.robot
new file mode 100644
index 0000000..71656e4
--- /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 b578a5b..eaaa8b4 100755
--- a/csit/run-k8s-csit.sh
+++ b/csit/run-k8s-csit.sh
@@ -28,7 +28,7 @@
 
 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 8d467ad..cbb62e6 100755
--- a/csit/run-project-csit.sh
+++ b/csit/run-project-csit.sh
@@ -41,8 +41,8 @@
 }
 
 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}"
 }