Skip to content

Commit

Permalink
cleanup(robot)
Browse files Browse the repository at this point in the history
  • Loading branch information
bouda1 committed Oct 23, 2023
1 parent 946a914 commit 1d04c74
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion tests/bam/bam_pb.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/bam/pb_inherited_downtime.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/broker-engine/anomaly-detection.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/broker-engine/bench.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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: <<warning_99>>
${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}
Expand Down
4 changes: 2 additions & 2 deletions tests/broker-engine/external-commands2.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/broker-engine/hostgroups.robot
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ 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

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
Expand Down
4 changes: 2 additions & 2 deletions tests/broker-engine/muxer_filter.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
38 changes: 19 additions & 19 deletions tests/broker-engine/output-tables.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions tests/broker-engine/retention-duplicates.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion tests/broker-engine/services-increased.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions tests/broker/sql.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
14 changes: 7 additions & 7 deletions tests/engine/forced_checks.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1d04c74

Please sign in to comment.