diff options
author | Yossi Gottlieb <yossigo@gmail.com> | 2020-09-09 15:12:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-09 15:12:57 +0300 |
commit | 818a746e32de934c6c6e828ccf39df361361037e (patch) | |
tree | 0ca8495006d0eb8fb79f8ead30e7b518c39619cf /tests/unit/introspection.tcl | |
parent | ce15620dc17ebad94cd03cb4ee779fdd4e99b212 (diff) | |
download | redis-818a746e32de934c6c6e828ccf39df361361037e.tar.gz |
Fix default/explicit "save" parameter loading. (#7767)
Save parameters should either be default or whatever specified in the
config file. This fixes an issue introduced in #7092 which causes
configuration file settings to be applied on top of the defaults.
Diffstat (limited to 'tests/unit/introspection.tcl')
-rw-r--r-- | tests/unit/introspection.tcl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit/introspection.tcl b/tests/unit/introspection.tcl index d681e06d5..869f34732 100644 --- a/tests/unit/introspection.tcl +++ b/tests/unit/introspection.tcl @@ -58,6 +58,19 @@ start_server {tags {"introspection"}} { } } + test {CONFIG save params special case handled properly} { + # No "save" keyword - defaults should apply + start_server {config "minimal.conf"} { + assert_match [r config get save] {save {3600 1 300 100 60 10000}} + } + + # First "save" keyword overrides defaults + start_server {config "minimal.conf" overrides {save {100 100}}} { + # Defaults + assert_match [r config get save] {save {100 100}} + } + } + test {CONFIG sanity} { # Do CONFIG GET, CONFIG SET and then CONFIG GET again # Skip immutable configs, one with no get, and other complicated configs |