From: garciadeblas Date: Thu, 1 Jun 2023 09:05:58 +0000 (+0200) Subject: Update SA tests to add filter string with ns_id to Get Metric X-Git-Tag: release-v14.0-start~19 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Ftests.git;a=commitdiff_plain;h=f9bc21a330b97f58cc2c041b9cb6936f6da3b61f Update SA tests to add filter string with ns_id to Get Metric Change-Id: I0d7586aa151da6add38086f4c7a1a02db77a4200 Signed-off-by: garciadeblas --- diff --git a/robot-systest/testsuite/sa_01-vnf_with_vim_metrics.robot b/robot-systest/testsuite/sa_01-vnf_with_vim_metrics.robot index b9b69ad..8c3d677 100644 --- a/robot-systest/testsuite/sa_01-vnf_with_vim_metrics.robot +++ b/robot-systest/testsuite/sa_01-vnf_with_vim_metrics.robot @@ -81,9 +81,10 @@ Get VNF VIM-based Metrics Variable Should Exist ${prometheus_port} msg=Prometheus port is not available Variable Should Exist ${metric_1_name} msg=Prometheus first metric name is not available Variable Should Exist ${metric_2_name} msg=Prometheus second metric name is not available - ${metric_1_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_1_name} + ${metric_filter}= Set Variable ns_id=${ns_id} + ${metric_1_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_1_name} ${metric_filter} Run Keyword If ${metric_1_value} <= 0 Fail msg=The metric '${metric_1_name}' value is '${metric_1_value}' - ${metric_2_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_2_name} + ${metric_2_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_2_name} ${metric_filter} Run Keyword If ${metric_2_value} <= 0 Fail msg=The metric '${metric_2_name}' value is '${metric_2_value}' diff --git a/robot-systest/testsuite/sa_02-vnf_with_vim_metrics_and_autoscaling.robot b/robot-systest/testsuite/sa_02-vnf_with_vim_metrics_and_autoscaling.robot index 3d1a3b3..b18e34a 100644 --- a/robot-systest/testsuite/sa_02-vnf_with_vim_metrics_and_autoscaling.robot +++ b/robot-systest/testsuite/sa_02-vnf_with_vim_metrics_and_autoscaling.robot @@ -119,7 +119,8 @@ Get VNF VIM-based Metric Before Auto-scaling Variable Should Exist ${prometheus_host} msg=Prometheus address is not available Variable Should Exist ${prometheus_port} msg=Prometheus port is not available Variable Should Exist ${metric_name} msg=Prometheus metric name is not available - ${metric_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_name} + ${metric_filter}= Set Variable ns_id=${ns_id} + ${metric_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_name} ${metric_filter} Run Keyword If ${metric_value} <= 0 Fail msg=The metric '${metric_name}' value is '${metric_value}' Run Keyword If ${metric_value} >= ${metric_threshold} Fail msg=The metric '${metric_name}' value is higher than '${metric_threshold}' before scaling @@ -190,6 +191,7 @@ Check VIM-based Metric Exceeds Threshold Variable Should Exist ${prometheus_host} msg=Prometheus address is not available Variable Should Exist ${prometheus_port} msg=Prometheus port is not available Variable Should Exist ${metric_name} msg=Prometheus metric name is not available - ${metric_value}= Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_name} + ${metric_filter}= Set Variable ns_id=${ns_id} + ${metric_value}= Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_name} ${metric_filter} Run Keyword If ${metric_value} <= ${metric_threshold} Fail msg=The metric '${metric_name}' value is '${metric_value}' which is lower than '${metric_threshold}' diff --git a/robot-systest/testsuite/sa_07-alarms_from_sa-related_vnfs.robot b/robot-systest/testsuite/sa_07-alarms_from_sa-related_vnfs.robot index 9ce02b5..eada9ba 100644 --- a/robot-systest/testsuite/sa_07-alarms_from_sa-related_vnfs.robot +++ b/robot-systest/testsuite/sa_07-alarms_from_sa-related_vnfs.robot @@ -137,7 +137,8 @@ Get Alarm Metric Variable Should Exist ${prometheus_host} msg=Prometheus address is not available Variable Should Exist ${prometheus_port} msg=Prometheus port is not available Variable Should Exist ${metric_name} msg=Prometheus metric name is not available - ${metric_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_name} + ${metric_filter}= Set Variable ns_id=${ns_id} + ${metric_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_name} ${metric_filter} Run Keyword If ${metric_value} <= 0 Fail msg=The metric '${metric_name}' value is '${metric_value}'