2024-03-21 09:30:47 -04:00
|
|
|
# Copyright (C) 2014 Salvatore Sanfilippo antirez@gmail.com
|
|
|
|
# SPDX-FileCopyrightText: 2024 Redict Contributors
|
|
|
|
# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo <antirez at gmail dot com>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2024-03-21 15:11:44 -04:00
|
|
|
# SPDX-License-Identifier: LGPL-3.0-only
|
2014-04-24 05:08:22 -04:00
|
|
|
|
|
|
|
cd tests/sentinel
|
|
|
|
source ../instances.tcl
|
|
|
|
|
2014-04-29 10:17:15 -04:00
|
|
|
set ::instances_count 5 ; # How many instances we use at max.
|
2019-09-12 04:10:22 -04:00
|
|
|
set ::tlsdir "../../tls"
|
2014-04-29 10:17:15 -04:00
|
|
|
|
2014-04-24 05:08:22 -04:00
|
|
|
proc main {} {
|
|
|
|
parse_options
|
2021-02-08 10:02:46 -05:00
|
|
|
if {$::leaked_fds_file != ""} {
|
|
|
|
set ::env(LEAKED_FDS_FILE) $::leaked_fds_file
|
|
|
|
}
|
2021-12-20 05:31:13 -05: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"
|
|
|
|
|
2024-03-21 05:56:59 -04:00
|
|
|
spawn_instance redict $::redict_base_port $::instances_count {
|
2021-12-20 05:31:13 -05:00
|
|
|
"enable-protected-configs yes"
|
|
|
|
"enable-debug-command yes"
|
2023-04-18 09:14:26 -04:00
|
|
|
"save ''"
|
2021-12-20 05:31:13 -05:00
|
|
|
}
|
2014-04-24 05:08:22 -04:00
|
|
|
run_tests
|
|
|
|
cleanup
|
2015-03-30 08:29:01 -04:00
|
|
|
end_tests
|
2014-04-24 05:08:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
if {[catch main e]} {
|
|
|
|
puts $::errorInfo
|
|
|
|
cleanup
|
2014-06-18 08:10:04 -04:00
|
|
|
exit 1
|
2014-04-24 05:08:22 -04:00
|
|
|
}
|