diff options
author | Wen Hui <wen.hui.ware@gmail.com> | 2022-11-20 05:03:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-20 12:03:00 +0200 |
commit | 2f411770c85ddfd226c02819c0f98a3f5a7854ac (patch) | |
tree | d921027c8667b2543c1b9de747c4e838adbe8f03 /tests | |
parent | 203b12e41ff7981f0fae5b23819f072d61594813 (diff) | |
download | redis-2f411770c85ddfd226c02819c0f98a3f5a7854ac.tar.gz |
Add CONFIG SET and GET loglevel feature in Sentinel (#11214)
Till now Sentinel allowed modifying the log level in the config file, but not at runtime.
this makes it possible to tune the log level at runtime
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sentinel/tests/01-conf-update.tcl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/sentinel/tests/01-conf-update.tcl b/tests/sentinel/tests/01-conf-update.tcl index 5dca55601..888e6c9b3 100644 --- a/tests/sentinel/tests/01-conf-update.tcl +++ b/tests/sentinel/tests/01-conf-update.tcl @@ -37,3 +37,11 @@ test "After Sentinel 1 is restarted, its config gets updated" { test "New master [join $addr {:}] role matches" { assert {[RI $master_id role] eq {master}} } + +test "Update log level" { + set current_loglevel [S 0 SENTINEL CONFIG GET loglevel] + assert {[lindex $current_loglevel 1] == {notice}} + S 0 SENTINEL CONFIG SET loglevel warning + set updated_loglevel [S 0 SENTINEL CONFIG GET loglevel] + assert {[lindex $updated_loglevel 1] == {warning}} +} |