mirror of https://mirror.osredm.com/root/redis.git
solve redis-cli test failures due to local history file (#13419)
test failure: ``` [err]: Interactive CLI: should find second search result if user presses ctrl+s in tests/integration/redis-cli.tcl Expected '1' to be equal to '0' (context: type eval line 10 cmd {assert_equal 1 [regexp {\(i-search\): \x1B\[0mk\x1B\[1mey\x1B\[0ms one} $result]} proc ::test) ``` this test (introduced in #12543) depends on the local history file, so it can fail if there's some match there. the fix is to use a different history file, and delete it before each run.
This commit is contained in:
parent
b10e19e3d6
commit
880e147d52
|
@ -68,10 +68,10 @@ start_server {tags {"cli"}} {
|
|||
set _ [format_output [read_cli $fd]]
|
||||
}
|
||||
|
||||
# Note: prompt may be affected by the local history, if failed, please
|
||||
# try using `rm ~/.rediscli_history` to delete it and then retry.
|
||||
file delete ./.rediscli_history_test
|
||||
proc test_interactive_cli_with_prompt {name code} {
|
||||
set ::env(FAKETTY_WITH_PROMPT) 1
|
||||
set ::env(REDISCLI_HISTFILE) ".rediscli_history_test"
|
||||
test_interactive_cli $name $code
|
||||
unset ::env(FAKETTY_WITH_PROMPT)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue