diff options
Diffstat (limited to 'csit')
-rw-r--r-- | csit/resources/tests/api-slas.robot | 13 | ||||
-rw-r--r-- | csit/resources/tests/api-test.robot | 5 | ||||
-rwxr-xr-x | csit/run-k8s-csit.sh | 21 |
3 files changed, 26 insertions, 13 deletions
diff --git a/csit/resources/tests/api-slas.robot b/csit/resources/tests/api-slas.robot index c5feb728..717ac3d7 100644 --- a/csit/resources/tests/api-slas.robot +++ b/csit/resources/tests/api-slas.robot @@ -28,9 +28,14 @@ ValidateResponseTimeQueryPolicies [Documentation] Validate query policies response time ValidateResponseTimeForApi /policies GET +ValidateResponseTimeQueryPolicyTypeListVersions + [Documentation] Validate query policyType versions response time + ValidateResponseTime api-metrics /policytypes/{policyTypeId} GET 400 + +#Time increased from 200 to 250 due to slow ONAP machines ValidateResponseTimeQueryPolicyVersion [Documentation] Validate query policy by version response time - ValidateResponseTimeForApi /policies/{policyId}/versions/{policyVersion} GET + ValidateResponseTime api-metrics /policies/{policyId}/versions/{policyVersion} GET 250 ValidateResponseTimeCreatePolicy [Documentation] Validate response time for creating a policy @@ -42,4 +47,8 @@ ValidateResponseTimeCreatePolicyType ValidateResponseTimeDeletePolicy [Documentation] Validate response time for deletion of policies - ValidateResponseTimeForApi /policies/{policyId}/versions/{policyVersion} DELETE
\ No newline at end of file + ValidateResponseTimeForApi /policies/{policyId}/versions/{policyVersion} DELETE + +ValidateResponseTimeDeletePolicyType + [Documentation] Validate response time for deletion of policyTypes + ValidateResponseTimeForApi /policytypes/{policyTypeId}/versions/{versionId} DELETE diff --git a/csit/resources/tests/api-test.robot b/csit/resources/tests/api-test.robot index f3c87de3..e8679a7f 100644 --- a/csit/resources/tests/api-test.robot +++ b/csit/resources/tests/api-test.robot @@ -140,11 +140,6 @@ GetReq ${resp}= PerformGetRequest ${POLICY_API_IP} ${url} 200 null ${auth} [return] ${resp} -ValidateResponseTimeForApi - [Arguments] ${url} ${method} - [Documentation] Check if url response is under required time for api metrics - ValidateResponseTime api-metrics ${url} ${method} 500 - DeleteReq [Arguments] ${url} ${expectedstatus} ${auth}= PolicyAdminAuth diff --git a/csit/run-k8s-csit.sh b/csit/run-k8s-csit.sh index a987c112..fb52b79f 100755 --- a/csit/run-k8s-csit.sh +++ b/csit/run-k8s-csit.sh @@ -30,7 +30,7 @@ CSIT_SCRIPT="scripts/run-test.sh" ROBOT_DOCKER_IMAGE="policy-csit-robot" POLICY_CLAMP_ROBOT="policy-clamp-test.robot" POLICY_API_ROBOT="api-test.robot" -POLICY_PAP_ROBOT="pap-test.robot" +POLICY_PAP_ROBOT="pap-test.robot pap-slas.robot" POLICY_APEX_PDP_ROBOT="apex-pdp-test.robot" POLICY_XACML_PDP_ROBOT="xacml-pdp-test.robot" POLICY_DROOLS_PDP_ROBOT="drools-pdp-test.robot" @@ -87,6 +87,8 @@ function teardown_cluster () { sudo snap remove microk8s;rm -rf $HOME/.kube/config sudo rm -rf /dockerdata-nfs/mariadb-galera/ echo "K8s Cluster removed" + echo "Clean up docker" + docker system prune -af } @@ -107,16 +109,21 @@ function build_robot_image () { echo "Importing robot image into microk8s registry" docker save -o policy-csit-robot.tar ${ROBOT_DOCKER_IMAGE}:latest microk8s ctr image import policy-csit-robot.tar +} + + +function start_csit () { + build_robot_image if [ "${?}" -eq 0 ]; then - rm -rf policy-csit-robot.tar - rm -rf tests/models/ + rm -rf ${WORKSPACE}/csit/resources/policy-csit-robot.tar + rm -rf ${WORKSPACE}/csit/resources/tests/models/ echo "---------------------------------------------" echo "Installing Robot framework pod for running CSIT" cd ${WORKSPACE}/helm mkdir -p ${ROBOT_LOG_DIR} microk8s helm install csit-robot robot --set robot="$ROBOT_FILE" --set "readiness={${READINESS_CONTAINERS[*]}}" --set robotLogDir=$ROBOT_LOG_DIR; print_robot_log - fi + fi } @@ -178,7 +185,8 @@ function get_robot_file () { pap | policy-pap) export ROBOT_FILE=$POLICY_PAP_ROBOT - export READINESS_CONTAINERS=($POLICY_APEX_CONTAINER,$POLICY_PAP_CONTAINER,$POLICY_API_CONTAINER) + export READINESS_CONTAINERS=($POLICY_APEX_CONTAINER,$POLICY_PAP_CONTAINER,$POLICY_API_CONTAINER,$POLICY_DROOLS_CONTAINER, + $POLICY_XACML_CONTAINER) ;; apex-pdp | policy-apex-pdp) @@ -217,6 +225,7 @@ if [ $1 == "install" ]; then cd ${WORKSPACE}/helm || exit; microk8s helm dependency build policy microk8s helm install csit-policy policy + microk8s helm install prometheus prometheus echo "Policy chart installation completed" echo "-------------------------------------------" fi @@ -228,7 +237,7 @@ if [ $1 == "install" ]; then echo "CSIT will be invoked from $ROBOT_FILE" echo "Readiness containers: ${READINESS_CONTAINERS[*]}" echo "-------------------------------------------" - build_robot_image + start_csit else echo "No project supplied for running CSIT" fi |