From 1d04c74213af8d3582e13fb729cde9ed9d43b73d Mon Sep 17 00:00:00 2001 From: David Boucher Date: Mon, 23 Oct 2023 12:10:18 +0200 Subject: [PATCH] cleanup(robot) --- tests/bam/bam_pb.robot | 2 +- tests/bam/pb_inherited_downtime.robot | 2 +- tests/broker-engine/anomaly-detection.robot | 2 +- tests/broker-engine/bench.robot | 2 +- tests/broker-engine/external-commands2.robot | 4 +- tests/broker-engine/hostgroups.robot | 4 +- tests/broker-engine/muxer_filter.robot | 4 +- tests/broker-engine/output-tables.robot | 38 +++++++++---------- .../broker-engine/retention-duplicates.robot | 10 ++--- tests/broker-engine/services-increased.robot | 2 +- tests/broker/sql.robot | 4 +- tests/engine/forced_checks.robot | 14 +++---- 12 files changed, 44 insertions(+), 44 deletions(-) diff --git a/tests/bam/bam_pb.robot b/tests/bam/bam_pb.robot index 955ba341f11..8ca5d43f345 100644 --- a/tests/bam/bam_pb.robot +++ b/tests/bam/bam_pb.robot @@ -792,7 +792,7 @@ BEPB_BA_DURATION_EVENT # KPI set to critical # as GetCurrent Date floor milliseconds to upper or lower integer, we substract 1s - ${start_event} get_round_current_date + ${start_event} Get Round Current Date Process Service Result Hard host_16 service_314 2 output critical for 314 ${result} Check Service Status With Timeout host_16 service_314 2 60 HARD Should Be True ${result} The service (host_16,service_314) is not CRITICAL as expected diff --git a/tests/bam/pb_inherited_downtime.robot b/tests/bam/pb_inherited_downtime.robot index c717e75c25c..358ca110d07 100644 --- a/tests/bam/pb_inherited_downtime.robot +++ b/tests/bam/pb_inherited_downtime.robot @@ -146,7 +146,7 @@ BEBAMIDTU2 END # There are still two downtimes: the one on the ba and the one on the kpi. - ${result} Number Of Downtimes is 2 60 + ${result} Number Of Downtimes Is 2 60 Should Be True ${result} We should only have only two downtimes # The downtime is deleted diff --git a/tests/broker-engine/anomaly-detection.robot b/tests/broker-engine/anomaly-detection.robot index cfc38ab2fbf..7236b3fb87f 100644 --- a/tests/broker-engine/anomaly-detection.robot +++ b/tests/broker-engine/anomaly-detection.robot @@ -189,7 +189,7 @@ AOUTLU1 Stop Engine Kindly Stop Broker ${lst} Create List 1 0 4 - ${result} Check Types in resources ${lst} + ${result} Check Types In Resources ${lst} Should Be True ... ${result} ... The table 'resources' should contain rows of types SERVICE, HOST and ANOMALY_DETECTION. diff --git a/tests/broker-engine/bench.robot b/tests/broker-engine/bench.robot index e22907ae8a1..66dc30aa930 100644 --- a/tests/broker-engine/bench.robot +++ b/tests/broker-engine/bench.robot @@ -212,7 +212,7 @@ BENCH_1000STATUS_100${suffixe} ${diff_engine} Diff Process Stat ${engine_stat_after} ${engine_stat_before} ${content} Create List pb service (100, 2000) status 1 type 1 check result output: <> - ${result} Find In Log With Timeout with Line ${centralLog} ${start_check} ${content} 240 + ${result} Find In Log With Timeout With Line ${centralLog} ${start_check} ${content} 240 Should Be True ${result[0]} No check check result received. ${date_last_check_received} Extract Date From Log ${result[1][0]} ${all_check_delay} Subtract Date From Date ${date_last_check_received} ${start_check} diff --git a/tests/broker-engine/external-commands2.robot b/tests/broker-engine/external-commands2.robot index 3f21e613738..57ab3bfc9f9 100644 --- a/tests/broker-engine/external-commands2.robot +++ b/tests/broker-engine/external-commands2.robot @@ -1416,8 +1416,8 @@ BESERVCHECK Connect To Database pymysql ${DBName} ${DBUser} ${DBPass} ${DBHost} ${DBPort} Execute SQL String UPDATE services set command_line='toto', next_check=0 where service_id=1 and host_id=1 Schedule Forced Svc Check host_1 service_1 - ${command_param} get_command_service_param 1 - ${result} check_service_check_with_timeout + ${command_param} Get Command Service Param 1 + ${result} Check Service Check With Timeout ... host_1 ... service_1 ... 30 diff --git a/tests/broker-engine/hostgroups.robot b/tests/broker-engine/hostgroups.robot index a04c1d0ebdd..d225e02e266 100644 --- a/tests/broker-engine/hostgroups.robot +++ b/tests/broker-engine/hostgroups.robot @@ -143,7 +143,7 @@ EBNHGU3 Reload Broker Reload Engine - ${result} Check Number of relations between hostgroup and hosts 1 12 30 + ${result} Check Number Of Relations Between Hosgroup And Hosts 1 12 30 Should Be True ${result} We should have 12 hosts members of host 1. Config Engine Remove Cfg File ${0} hostgroups.cfg @@ -151,7 +151,7 @@ EBNHGU3 Sleep 3s Reload Broker Reload Engine - ${result} Check Number of relations between hostgroup and hosts 1 9 30 + ${result} Check Number Of Relations Between Hosgroup And Hosts 1 9 30 Should Be True ${result} We should have 12 hosts members of host 1. Stop Engine diff --git a/tests/broker-engine/muxer_filter.robot b/tests/broker-engine/muxer_filter.robot index b0e68db00da..c4e8f83ecf1 100644 --- a/tests/broker-engine/muxer_filter.robot +++ b/tests/broker-engine/muxer_filter.robot @@ -308,7 +308,7 @@ CBD_RELOAD_AND_FILTERS # We check that output filters to rrd are set to "storage" ${content} Create List rrd event of type .* rejected by write filter - ${result} Find Regex In Log with Timeout ${centralLog} ${start2} ${content} 120 + ${result} Find Regex In Log With Timeout ${centralLog} ${start2} ${content} 120 Should Be True ${result} No event rejected by the rrd output whereas only storage category is enabled. Log To Console Third configuration: all events are sent. @@ -411,7 +411,7 @@ CBD_RELOAD_AND_FILTERS_WITH_OPR # We check that output filters to rrd are set to "storage" ${content} Create List rrd event of type .* rejected by write filter - ${result} Find Regex In Log with Timeout ${centralLog} ${start2} ${content} 120 + ${result} Find Regex In Log With Timeout ${centralLog} ${start2} ${content} 120 Should Be True ${result} No event rejected by the rrd output whereas only storage category is enabled. Log To Console Third configuration: all events are sent. diff --git a/tests/broker-engine/output-tables.robot b/tests/broker-engine/output-tables.robot index 0e444fe943a..bd5d8096ee0 100644 --- a/tests/broker-engine/output-tables.robot +++ b/tests/broker-engine/output-tables.robot @@ -116,38 +116,38 @@ BEINSTANCESTATUS ${content} Create List check_for_external_commands ${result} Find In Log With Timeout ${engineLog0} ${start} ${content} 60 Should Be True ${result} No check for external commands executed for 1mn. - ${result} check_field_db_value + ${result} Check Field Db Value ... SELECT global_host_event_handler FROM instances WHERE instance_id=1 ... command_1 ... 30 Should Be True ${result} global_host_event_handler not updated. - ${result} check_field_db_value + ${result} Check Field Db Value ... SELECT global_service_event_handler FROM instances WHERE instance_id=1 ... command_2 ... 2 Should Be True ${result} global_service_event_handler not updated. - ${result} check_field_db_value SELECT flap_detection FROM instances WHERE instance_id=1 ${1} 3 + ${result} Check Field Db Value SELECT flap_detection FROM instances WHERE instance_id=1 ${1} 3 Should Be True ${result} flap_detection not updated. - ${result} check_field_db_value SELECT notifications FROM instances WHERE instance_id=1 ${0} 3 + ${result} Check Field Db Value SELECT notifications FROM instances WHERE instance_id=1 ${0} 3 Should Be True ${result} notifications not updated. - ${result} check_field_db_value SELECT active_host_checks FROM instances WHERE instance_id=1 ${0} 3 + ${result} Check Field Db Value SELECT active_host_checks FROM instances WHERE instance_id=1 ${0} 3 Should Be True ${result} active_host_checks not updated. - ${result} check_field_db_value SELECT active_service_checks FROM instances WHERE instance_id=1 ${0} 3 + ${result} Check Field Db Value SELECT active_service_checks FROM instances WHERE instance_id=1 ${0} 3 Should Be True ${result} active_service_checks not updated. - ${result} check_field_db_value SELECT check_hosts_freshness FROM instances WHERE instance_id=1 ${0} 3 + ${result} Check Field Db Value SELECT check_hosts_freshness FROM instances WHERE instance_id=1 ${0} 3 Should Be True ${result} check_hosts_freshness not updated. - ${result} check_field_db_value + ${result} Check Field Db Value ... SELECT check_services_freshness FROM instances WHERE instance_id=1 ... ${1} ... 3 Should Be True ${result} check_services_freshness not updated. - ${result} check_field_db_value SELECT obsess_over_hosts FROM instances WHERE instance_id=1 ${1} 3 + ${result} Check Field Db Value SELECT obsess_over_hosts FROM instances WHERE instance_id=1 ${1} 3 Should Be True ${result} obsess_over_hosts not updated. - ${result} check_field_db_value SELECT obsess_over_services FROM instances WHERE instance_id=1 ${1} 3 + ${result} Check Field Db Value SELECT obsess_over_services FROM instances WHERE instance_id=1 ${1} 3 Should Be True ${result} obsess_over_services not updated. - ${result} check_field_db_value SELECT passive_host_checks FROM instances WHERE instance_id=1 ${0} 3 + ${result} Check Field Db Value SELECT passive_host_checks FROM instances WHERE instance_id=1 ${0} 3 Should Be True ${result} passive_host_checks not updated. - ${result} check_field_db_value SELECT passive_service_checks FROM instances WHERE instance_id=1 ${0} 3 + ${result} Check Field Db Value SELECT passive_service_checks FROM instances WHERE instance_id=1 ${0} 3 Should Be True ${result} passive_service_checks not updated. Stop Engine Kindly Stop Broker @@ -167,22 +167,22 @@ BEINSTANCE Execute SQL String DELETE FROM instances #as GetCurrent Date floor milliseconds to upper or lower integer, we substract 1s - ${start} get_round_current_date + ${start} Get Round Current Date Start Broker Start Engine ${engine_pid} Get Engine Pid e0 - ${result} check_field_db_value SELECT pid FROM instances WHERE instance_id=1 ${engine_pid} 30 + ${result} Check Field Db Value SELECT pid FROM instances WHERE instance_id=1 ${engine_pid} 30 Should Be True ${result} no correct engine pid in instances table. - ${result} check_field_db_value SELECT engine FROM instances WHERE instance_id=1 Centreon Engine 3 + ${result} Check Field Db Value SELECT engine FROM instances WHERE instance_id=1 Centreon Engine 3 Should Be True ${result} no correct engine in instances table. - ${result} check_field_db_value SELECT running FROM instances WHERE instance_id=1 ${1} 3 + ${result} Check Field Db Value SELECT running FROM instances WHERE instance_id=1 ${1} 3 Should Be True ${result} no correct running in instances table. - ${result} check_field_db_value SELECT name FROM instances WHERE instance_id=1 Poller0 3 + ${result} Check Field Db Value SELECT name FROM instances WHERE instance_id=1 Poller0 3 Should Be True ${result} no correct name in instances table. - ${result} check_field_db_value SELECT end_time FROM instances WHERE instance_id=1 ${0} 3 + ${result} Check Field Db Value SELECT end_time FROM instances WHERE instance_id=1 ${0} 3 Should Be True ${result} no correct end_time in instances table. @{bdd_start_time} Query SELECT start_time FROM instances WHERE instance_id=1 - ${now} get_round_current_date + ${now} Get Round Current Date Should Be True ... ${start} <= ${bdd_start_time[0][0]} and ${bdd_start_time[0][0]} <= ${now} ... sg=no correct start_time in instances table. diff --git a/tests/broker-engine/retention-duplicates.robot b/tests/broker-engine/retention-duplicates.robot index 844d0a688d1..1c6292abd1c 100644 --- a/tests/broker-engine/retention-duplicates.robot +++ b/tests/broker-engine/retention-duplicates.robot @@ -327,7 +327,7 @@ BERDUC3U2 ${start} Get Round Current Date # Let's wait for a first service status. ${content} Create List SQL: pb service .* status .* type .* check result output - ${result} Find Regex In Log with Timeout ${centralLog} ${start} ${content} 60 + ${result} Find Regex In Log With Timeout ${centralLog} ${start} ${content} 60 Should Be True ${result[0]} We did not get any pb service status for 60s ${result} Check Connections @@ -387,11 +387,11 @@ BERDUCA300 Should Be True ${result} Broker should receive a pb stop message from engine. ${content} Create List send acknowledgement for [0-9]+ events - ${result} Find Regex in Log with Timeout ${centralLog} ${start} ${content} 30 + ${result} Find Regex In Log With Timeout ${centralLog} ${start} ${content} 30 Should Be True ${result[0]} Broker should send an ack for handled events. ${content} Create List BBDO: received acknowledgement for [0-9]+ events before finishing - ${result} Find Regex in Log with Timeout ${moduleLog0} ${start} ${content} 30 + ${result} Find Regex In Log With Timeout ${moduleLog0} ${start} ${content} 30 Should Be True ${result[0]} Engine should receive an ack for handled events from broker. Kindly Stop Broker @@ -440,11 +440,11 @@ BERDUCA301 Should Be True ${result} Broker should receive a pb stop message from engine. ${content} Create List send pb acknowledgement for [0-9]+ events - ${result} Find Regex in Log with Timeout ${centralLog} ${start} ${content} 30 + ${result} Find Regex In Log With Timeout ${centralLog} ${start} ${content} 30 Should Be True ${result[0]} Broker should send an ack for handled events. ${content} Create List BBDO: received acknowledgement for [0-9]+ events before finishing - ${result} Find Regex in Log with Timeout ${moduleLog0} ${start} ${content} 30 + ${result} Find Regex In Log With Timeout ${moduleLog0} ${start} ${content} 30 Should Be True ${result[0]} Engine should receive an ack for handled events from broker. Kindly Stop Broker diff --git a/tests/broker-engine/services-increased.robot b/tests/broker-engine/services-increased.robot index 6226a4ddd97..01184db2e1e 100644 --- a/tests/broker-engine/services-increased.robot +++ b/tests/broker-engine/services-increased.robot @@ -85,7 +85,7 @@ Service_increased_huge_check_interval Start Broker Start Engine # Start Checkers - ${result} Check host status host_1 4 1 False + ${result} Check Host Status host_1 4 1 False Should Be True ${result} host_1 should be pending ${content} Create List INITIAL HOST STATE: host_1; diff --git a/tests/broker/sql.robot b/tests/broker/sql.robot index 348565a73ff..5f26e434d0d 100644 --- a/tests/broker/sql.robot +++ b/tests/broker/sql.robot @@ -297,7 +297,7 @@ BDBU1 ${start} Get Current Date Start Broker ${content} Create List Table 'centreon\..*' doesn't exist - ${result} Find Regex In Log with timeout ${centralLog} ${start} ${content} 60 + ${result} Find Regex In Log With Timeout ${centralLog} ${start} ${content} 60 Should Be True ${result} A message about some missing tables in 'centreon' database should appear Kindly Stop Broker END @@ -363,7 +363,7 @@ BDBU10 ${start} Get Current Date Start Broker ${content} Create List mysql_connection 0x[0-9a-f]* : commit - ${result} Find Regex In Log with timeout ${centralLog} ${start} ${content} 40 + ${result} Find Regex In Log With Timeout ${centralLog} ${start} ${content} 40 Should Be True ${result[0]} Log concerning a commit (connection ok) is missing. Kindly Stop Broker diff --git a/tests/engine/forced_checks.robot b/tests/engine/forced_checks.robot index b103b50b5cb..61b2f2e606d 100644 --- a/tests/engine/forced_checks.robot +++ b/tests/engine/forced_checks.robot @@ -33,7 +33,7 @@ EFHC1 ${start} Get Current Date Start Engine Start Broker - ${result} Check host status host_1 4 1 False + ${result} Check Host Status host_1 4 1 False Should Be True ${result} host_1 should be pending ${content} Create List INITIAL HOST STATE: host_1; @@ -57,7 +57,7 @@ EFHC1 ${result} Find In Log With Timeout ${engineLog0} ${start} ${content} 60 Should Be True ${result} Message about SCHEDULE FORCED CHECK and HOST ALERT should be available in log. - ${result} Check host status host_1 1 1 False + ${result} Check Host Status host_1 1 1 False Should Be True ${result} host_1 should be down/hard Stop Engine Kindly Stop Broker @@ -100,7 +100,7 @@ EFHC2 ${result} Find In Log With Timeout ${engineLog0} ${start} ${content} 60 Should Be True ${result} Message about SCHEDULE FORCED CHECK and HOST ALERT should be available in log. - ${result} Check host status host_1 1 1 False + ${result} Check Host Status host_1 1 1 False Should Be True ${result} host_1 should be down/hard Stop Engine Kindly Stop Broker @@ -129,7 +129,7 @@ EFHCU1 ${start} Get Current Date Start Engine Start Broker - ${result} Check host status host_1 4 1 True + ${result} Check Host Status host_1 4 1 True Should Be True ${result} host_1 should be pending ${content} Create List INITIAL HOST STATE: host_1; ${result} Find In Log With Timeout ${engineLog0} ${start} ${content} 60 @@ -152,7 +152,7 @@ EFHCU1 ${result} Find In Log With Timeout ${engineLog0} ${start} ${content} 60 Should Be True ${result} Message about SCHEDULE FORCED CHECK and HOST ALERT should be available in log. - ${result} Check host status host_1 1 1 True + ${result} Check Host Status host_1 1 1 True Should Be True ${result} host_1 should be down/hard Stop Engine Kindly Stop Broker @@ -180,7 +180,7 @@ EFHCU2 ${start} Get Current Date Start Engine Start Broker - ${result} Check host status host_1 4 1 True + ${result} Check Host Status host_1 4 1 True Should Be True ${result} host_1 should be pending ${content} Create List INITIAL HOST STATE: host_1; ${result} Find In Log With Timeout ${engineLog0} ${start} ${content} 60 @@ -203,7 +203,7 @@ EFHCU2 ${result} Find In Log With Timeout ${engineLog0} ${start} ${content} 60 Should Be True ${result} Message about SCHEDULE FORCED CHECK and HOST ALERT should be available in log. - ${result} Check host status host_1 1 1 True + ${result} Check Host Status host_1 1 1 True Should Be True ${result} host_1 should be down/hard Stop Engine Kindly Stop Broker