2014-04-24 09:08:22 +00:00
|
|
|
# Sentinel test suite. Copyright (C) 2014 Salvatore Sanfilippo antirez@gmail.com
|
2014-07-31 18:25:48 +00:00
|
|
|
# This software is released under the BSD License. See the COPYING file for
|
2014-04-24 09:08:22 +00:00
|
|
|
# more information.
|
|
|
|
|
|
|
|
cd tests/sentinel
|
|
|
|
source ../instances.tcl
|
|
|
|
|
2014-04-29 14:17:15 +00:00
|
|
|
set ::instances_count 5 ; # How many instances we use at max.
|
2019-09-12 08:10:22 +00:00
|
|
|
set ::tlsdir "../../tls"
|
2014-04-29 14:17:15 +00:00
|
|
|
|
2014-04-24 09:08:22 +00:00
|
|
|
proc main {} {
|
|
|
|
parse_options
|
2021-02-08 15:02:46 +00:00
|
|
|
if {$::leaked_fds_file != ""} {
|
|
|
|
set ::env(LEAKED_FDS_FILE) $::leaked_fds_file
|
|
|
|
}
|
2021-12-20 10:31:13 +00:00
|
|
|
spawn_instance sentinel $::sentinel_base_port $::instances_count {
|
|
|
|
"sentinel deny-scripts-reconfig no"
|
|
|
|
"enable-protected-configs yes"
|
|
|
|
"enable-debug-command yes"
|
|
|
|
} "../tests/includes/sentinel.conf"
|
|
|
|
|
|
|
|
spawn_instance redis $::redis_base_port $::instances_count {
|
|
|
|
"enable-protected-configs yes"
|
|
|
|
"enable-debug-command yes"
|
2023-04-18 13:14:26 +00:00
|
|
|
"save ''"
|
2021-12-20 10:31:13 +00:00
|
|
|
}
|
2014-04-24 09:08:22 +00:00
|
|
|
run_tests
|
|
|
|
cleanup
|
2015-03-30 12:29:01 +00:00
|
|
|
end_tests
|
2014-04-24 09:08:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if {[catch main e]} {
|
|
|
|
puts $::errorInfo
|
|
|
|
cleanup
|
2014-06-18 12:10:04 +00:00
|
|
|
exit 1
|
2014-04-24 09:08:22 +00:00
|
|
|
}
|