From 10320257d87adb8e007bc7bb1a5f2c7cdd77417b Mon Sep 17 00:00:00 2001 From: aguilard Date: Fri, 1 Jul 2022 12:06:41 +0000 Subject: [PATCH] Fix warning about deprecation of 'Run Keyword Unless' keyword Change-Id: I97ed0aaac318484fec4dfd586a1f2596bbadf40f Signed-off-by: aguilard --- .../basic_08-disable_port_security_network_level.robot | 2 +- .../testsuite/basic_09-manual_vdu_scaling.robot | 4 ++-- .../basic_16-advanced_onboarding_and_scaling.robot | 6 +++--- .../basic_20-manual_native_charm_vdu_scaling.robot | 10 +++++----- .../testsuite/heal_02-scale_vdu_healing.robot | 2 +- robot-systest/testsuite/heal_03-multiple_healing.robot | 2 +- .../testsuite/k8s_08-simple_k8s_scaling.robot | 4 ++-- .../testsuite/k8s_11-simple_helm_k8s_scaling.robot | 4 ++-- .../testsuite/sa_01-vnf_with_vim_metrics.robot | 4 ++-- .../sa_02-vnf_with_vim_metrics_and_autoscaling.robot | 8 ++++---- .../testsuite/sa_07-alarms_from_sa-related_vnfs.robot | 2 +- .../testsuite/sa_08-vnf_with_vnf_indicators_snmp.robot | 4 ++-- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/robot-systest/testsuite/basic_08-disable_port_security_network_level.robot b/robot-systest/testsuite/basic_08-disable_port_security_network_level.robot index 80dd018..41228ea 100644 --- a/robot-systest/testsuite/basic_08-disable_port_security_network_level.robot +++ b/robot-systest/testsuite/basic_08-disable_port_security_network_level.robot @@ -59,7 +59,7 @@ Instantiate Network Service Check Port Security Is Disabled ${rc} ${disabled_ports}= Run and Return RC and Output osm ns-show ${ns_name} --literal | grep -c '${port_disabled_msg}' - Run Keyword Unless ${disabled_ports} > 0 Fail msg=Found '${disabled_ports}' matches for '${port_disabled_msg}' + Run Keyword If ${disabled_ports} <= 0 Fail msg=Found '${disabled_ports}' matches for '${port_disabled_msg}' Delete NS Instance diff --git a/robot-systest/testsuite/basic_09-manual_vdu_scaling.robot b/robot-systest/testsuite/basic_09-manual_vdu_scaling.robot index dfb502e..f5cdf0f 100644 --- a/robot-systest/testsuite/basic_09-manual_vdu_scaling.robot +++ b/robot-systest/testsuite/basic_09-manual_vdu_scaling.robot @@ -96,7 +96,7 @@ Check Vdus After Scale Out @{vdur_list}= Get Vnf Vdur Names ${vnf_id} Log List ${vdur_list} ${vdurs}= Get Length ${vdur_list} - Run Keyword Unless ${vdurs} == ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out + Run Keyword If ${vdurs} != ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out Perform Manual Vdu Scale In @@ -113,7 +113,7 @@ Check Vdus After Scaling In @{vdur_list}= Get Vnf Vdur Names ${vnf_id} Log List ${vdur_list} ${vdurs}= Get Length ${vdur_list} - Run Keyword Unless ${vdurs} == ${initial_vdur_count} Fail msg=There is the same number of VDU records in the VNF after Scale In + Run Keyword If ${vdurs} != ${initial_vdur_count} Fail msg=There is the same number of VDU records in the VNF after Scale In Delete NS Instance diff --git a/robot-systest/testsuite/basic_16-advanced_onboarding_and_scaling.robot b/robot-systest/testsuite/basic_16-advanced_onboarding_and_scaling.robot index bd0acb2..40053f0 100644 --- a/robot-systest/testsuite/basic_16-advanced_onboarding_and_scaling.robot +++ b/robot-systest/testsuite/basic_16-advanced_onboarding_and_scaling.robot @@ -82,7 +82,7 @@ Check Vdus Before Scale Out Log List ${vdur_list} ${vdurs}= Get Length ${vdur_list} Set Suite Variable ${initial_vdur_count} ${vdurs} - Run Keyword Unless ${init_instances} == ${initial_vdur_count} Fail msg=Instantiated VDUs (${initial_vdur_count}) don't match specified number in descriptor (${init_instances}) + Run Keyword If ${init_instances} != ${initial_vdur_count} Fail msg=Instantiated VDUs (${initial_vdur_count}) don't match specified number in descriptor (${init_instances}) Perform Manual Vdu Scale Out @@ -98,7 +98,7 @@ Check Vdus After Scale Out @{vdur_list}= Get Vnf Vdur Names ${vnf_id} Log List ${vdur_list} ${vdurs}= Get Length ${vdur_list} - Run Keyword Unless ${vdurs} == ${initial_vdur_count} + ${delta_instances} Fail msg=VDU instances in the VNF (${vdurs}) don't match after Scale Out (${initial_vdur_count} + ${delta_instances}) + Run Keyword If ${vdurs} != ${initial_vdur_count} + ${delta_instances} Fail msg=VDU instances in the VNF (${vdurs}) don't match after Scale Out (${initial_vdur_count} + ${delta_instances}) Perform Manual Vdu Scale In @@ -114,7 +114,7 @@ Check Vdus After Scaling In @{vdur_list}= Get Vnf Vdur Names ${vnf_id} Log List ${vdur_list} ${vdurs}= Get Length ${vdur_list} - Run Keyword Unless ${vdurs} == ${initial_vdur_count} Fail msg=There is the same number of VDU records in the VNF after Scale In + Run Keyword If ${vdurs} != ${initial_vdur_count} Fail msg=There is the same number of VDU records in the VNF after Scale In Delete NS Instance diff --git a/robot-systest/testsuite/basic_20-manual_native_charm_vdu_scaling.robot b/robot-systest/testsuite/basic_20-manual_native_charm_vdu_scaling.robot index df4faa4..cb3609f 100644 --- a/robot-systest/testsuite/basic_20-manual_native_charm_vdu_scaling.robot +++ b/robot-systest/testsuite/basic_20-manual_native_charm_vdu_scaling.robot @@ -92,7 +92,7 @@ Check Number of Duplicated Application Name Before Scale Out [Documentation] Check the application names if there are 2 application name in the application list. ${count_duplicated}= Get Length ${application_list} - Run Keyword Unless ${count_duplicated} == 2 Fail msg=There are not 2 application name in the application list before Scale Out + Run Keyword If ${count_duplicated} != 2 Fail msg=There are not 2 application name in the application list before Scale Out Perform Manual Vdu Scale Out @@ -108,7 +108,7 @@ Check Vdus After Scale Out @{vdur_list}= Get Vnf Vdur Names ${vnf_id} Log List ${vdur_list} ${vdurs}= Get Length ${vdur_list} - Run Keyword Unless ${vdurs} == ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out + Run Keyword If ${vdurs} != ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out Get Application Name After Scale Out @@ -123,7 +123,7 @@ Check Number of Duplicated Application Name After Scale Out [Documentation] Check the application names if there are 3 application name in the application list. ${count_duplicated}= Get Length ${application_list} - Run Keyword Unless ${count_duplicated} == 3 Fail msg=There are not 2 application name in the application list after Scale Out + Run Keyword If ${count_duplicated} != 3 Fail msg=There are not 2 application name in the application list after Scale Out Perform Manual Vdu Scale In @@ -139,7 +139,7 @@ Check Vdus After Scaling In @{vdur_list}= Get Vnf Vdur Names ${vnf_id} Log List ${vdur_list} ${vdurs}= Get Length ${vdur_list} - Run Keyword Unless ${vdurs} == ${initial_vdur_count} Fail msg=There is the same number of VDU records in the VNF after Scale In + Run Keyword If ${vdurs} != ${initial_vdur_count} Fail msg=There is the same number of VDU records in the VNF after Scale In Get Application Name After Scale In @@ -154,7 +154,7 @@ Check Number of Duplicated Application Name After Scale In [Documentation] Check the application names if there are 2 application name in the application list. ${count_duplicated}= Get Length ${application_list} - Run Keyword Unless ${count_duplicated} == 2 Fail msg=There are not 2 application name in the application list after Scale In + Run Keyword If ${count_duplicated} != 2 Fail msg=There are not 2 application name in the application list after Scale In Delete NS Instance diff --git a/robot-systest/testsuite/heal_02-scale_vdu_healing.robot b/robot-systest/testsuite/heal_02-scale_vdu_healing.robot index 9fda7c8..c7bd157 100644 --- a/robot-systest/testsuite/heal_02-scale_vdu_healing.robot +++ b/robot-systest/testsuite/heal_02-scale_vdu_healing.robot @@ -99,7 +99,7 @@ Scale Out Charm VNF Execute Manual VNF Scale ${ns_name} ${vnf_charm_index} ${vnf_charm_scaling_group} SCALE_OUT ${scale_wait_time} @{vdur_list}= Get Vnf Vdur Names ${vnf_charm_id} ${vdurs}= Get Length ${vdur_list} - Run Keyword Unless ${vdurs} == ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out + Run Keyword If ${vdurs} != ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out Get Charm VNF Info diff --git a/robot-systest/testsuite/heal_03-multiple_healing.robot b/robot-systest/testsuite/heal_03-multiple_healing.robot index c6b9e24..da3d381 100644 --- a/robot-systest/testsuite/heal_03-multiple_healing.robot +++ b/robot-systest/testsuite/heal_03-multiple_healing.robot @@ -99,7 +99,7 @@ Scale Out Charm VNF Execute Manual VNF Scale ${ns_name} ${vnf_charm_index} ${vnf_charm_scaling_group} SCALE_OUT ${scale_wait_time} @{vdur_list}= Get Vnf Vdur Names ${vnf_charm_id} ${vdurs}= Get Length ${vdur_list} - Run Keyword Unless ${vdurs} == ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out + Run Keyword If ${vdurs} != ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out Get Charm VNF Info diff --git a/robot-systest/testsuite/k8s_08-simple_k8s_scaling.robot b/robot-systest/testsuite/k8s_08-simple_k8s_scaling.robot index a172dac..ea6b7e1 100644 --- a/robot-systest/testsuite/k8s_08-simple_k8s_scaling.robot +++ b/robot-systest/testsuite/k8s_08-simple_k8s_scaling.robot @@ -98,7 +98,7 @@ Check Scale Count After Scale Out Variable Should Exist ${initial_kdu_count} msg=Initial KDU count is not available ${kdu_count}= Get Scale Number %{OSM_HOSTNAME} ${username} ${password} ${privatekey} ${application_name} ${model_name} - Run Keyword Unless ${kdu_count} == ${initial_kdu_count} + 1 Fail msg=There is no new KDU in the model after Scale Out + Run Keyword If ${kdu_count} != ${initial_kdu_count} + 1 Fail msg=There is no new KDU in the model after Scale Out Perform Manual KDU Scale In [Documentation] Scale in the application of network service k8s instance. @@ -109,7 +109,7 @@ Check Scale Count After Scale In [Documentation] Check whether the scale count is one less. ${kdu_count}= Get Scale Number %{OSM_HOSTNAME} ${username} ${password} ${privatekey} ${application_name} ${model_name} - Run Keyword Unless ${kdu_count} == ${initial_kdu_count} Fail msg=There is the same number of KDU in the model after Scale In + Run Keyword If ${kdu_count} != ${initial_kdu_count} Fail msg=There is the same number of KDU in the model after Scale In Delete NS K8s Instance Test [Tags] cleanup diff --git a/robot-systest/testsuite/k8s_11-simple_helm_k8s_scaling.robot b/robot-systest/testsuite/k8s_11-simple_helm_k8s_scaling.robot index 528a647..e994c17 100644 --- a/robot-systest/testsuite/k8s_11-simple_helm_k8s_scaling.robot +++ b/robot-systest/testsuite/k8s_11-simple_helm_k8s_scaling.robot @@ -96,7 +96,7 @@ Check Scale Count After Scale Out Variable Should Exist ${initial_kdu_count} msg=Initial KDU count is not available ${kdu_count}= Get Vnf Kdu Replica Count ${vnf_id} ${kdu_name} log ${kdu_count} - Run Keyword Unless ${kdu_count} == ${initial_kdu_count} + 2 Fail msg=There is no new KDU in the model after Scale Out + Run Keyword If ${kdu_count} != ${initial_kdu_count} + 2 Fail msg=There is no new KDU in the model after Scale Out Perform Manual KDU Scale In [Documentation] Scale in the application of network service k8s instance. @@ -107,7 +107,7 @@ Check Scale Count After Scale In [Documentation] Check whether the scale count is one less. ${kdu_count}= Get Vnf Kdu Replica Count ${vnf_id} ${kdu_name} - Run Keyword Unless ${kdu_count} == ${initial_kdu_count} Fail msg=There is the same number of KDU in the model after Scale In + Run Keyword If ${kdu_count} != ${initial_kdu_count} Fail msg=There is the same number of KDU in the model after Scale In Delete NS K8s Instance Test [Tags] cleanup 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 0eb546b..f2e6c1c 100644 --- a/robot-systest/testsuite/sa_01-vnf_with_vim_metrics.robot +++ b/robot-systest/testsuite/sa_01-vnf_with_vim_metrics.robot @@ -60,9 +60,9 @@ Get VNF VIM-based Metrics 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} ${metric_1_name} - Run Keyword Unless ${metric_1_value} > 0 Fail msg=The metric '${metric_1_name}' value is '${metric_1_value}' + 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} ${metric_2_name} - Run Keyword Unless ${metric_2_value} > 0 Fail msg=The metric '${metric_2_name}' value is '${metric_2_value}' + Run Keyword If ${metric_2_value} <= 0 Fail msg=The metric '${metric_2_name}' value is '${metric_2_value}' Delete NS Instance 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 ec2a6a3..fb6616f 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 @@ -90,8 +90,8 @@ Get VNF VIM-based Metric Before Auto-scaling 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} ${metric_name} - Run Keyword Unless ${metric_value} > 0 Fail msg=The metric '${metric_name}' value is '${metric_value}' - Run Keyword Unless ${metric_value} < ${metric_threshold} Fail msg=The metric '${metric_name}' value is higher than '${metric_threshold}' before scaling + 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 Increase VIM-based Metric To Force Auto-scaling @@ -113,7 +113,7 @@ Get VDUs After Auto-scaling @{vdur_list}= Get Vnf Vdur Names ${vnf_id} Log List ${vdur_list} ${vdurs}= Get Length ${vdur_list} - Run Keyword Unless ${vdurs} > 1 Fail msg=There is no new VDU after auto-scaling + Run Keyword If ${vdurs} <= 1 Fail msg=There is no new VDU after auto-scaling Delete NS Instance @@ -150,6 +150,6 @@ Check VIM-based Metric Exceeds Threshold 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} ${metric_name} - Run Keyword Unless ${metric_value} > ${metric_threshold} Fail msg=The metric '${metric_name}' value is '${metric_value}' which is lower than '${metric_threshold}' + 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 bc09c1c..917f73d 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 @@ -102,7 +102,7 @@ Get Alarm Metric 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} ${metric_name} - Run Keyword Unless ${metric_value} > 0 Fail msg=The metric '${metric_name}' value is '${metric_value}' + Run Keyword If ${metric_value} <= 0 Fail msg=The metric '${metric_name}' value is '${metric_value}' Check Alarms Were Received diff --git a/robot-systest/testsuite/sa_08-vnf_with_vnf_indicators_snmp.robot b/robot-systest/testsuite/sa_08-vnf_with_vnf_indicators_snmp.robot index 959e2ee..999e614 100644 --- a/robot-systest/testsuite/sa_08-vnf_with_vnf_indicators_snmp.robot +++ b/robot-systest/testsuite/sa_08-vnf_with_vnf_indicators_snmp.robot @@ -58,9 +58,9 @@ Get VNF SNMP Metrics 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 6 times 1 minutes Get Metric ${prometheus_host} ${prometheus_port} ${metric_1_name} ${metric_1_filter} - Run Keyword Unless ${metric_1_value} > 0 Fail msg=The metric '${metric_1_name}' value is '${metric_1_value}' + 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 6 times 1 minutes Get Metric ${prometheus_host} ${prometheus_port} ${metric_2_name} ${metric_2_filter} - Run Keyword Unless ${metric_2_value} > 0 Fail msg=The metric '${metric_2_name}' value is '${metric_2_value}' + Run Keyword If ${metric_2_value} <= 0 Fail msg=The metric '${metric_2_name}' value is '${metric_2_value}' Delete NS Instance -- 2.17.1