Unverified Commit b71a610f authored by Yuan Wang's avatar Yuan Wang Committed by GitHub
Browse files

Clean up .rediscli_history_test temporary file (#13601)

After running test in local, there will be a file named
`.rediscli_history_test`, and it is not in `.gitignore` file, so this is
considered to have changed the code base. It is a little annoying, this
commit just clean up the temporary file.

We should delete `.rediscli_history_test` in the end since the second
server tests also write somethings into it, to make it corresponding, i
put `set ::env(REDISCLI_HISTFILE) ".rediscli_history_test"` at the
beginning.

Maybe we also can add this file into `.gitignore`
parent efcfffc5
...@@ -6,6 +6,9 @@ if {$::singledb} { ...@@ -6,6 +6,9 @@ if {$::singledb} {
set ::dbnum 9 set ::dbnum 9
} }
file delete ./.rediscli_history_test
set ::env(REDISCLI_HISTFILE) ".rediscli_history_test"
start_server {tags {"cli"}} { start_server {tags {"cli"}} {
proc open_cli {{opts ""} {infile ""}} { proc open_cli {{opts ""} {infile ""}} {
if { $opts == "" } { if { $opts == "" } {
...@@ -68,10 +71,8 @@ start_server {tags {"cli"}} { ...@@ -68,10 +71,8 @@ start_server {tags {"cli"}} {
set _ [format_output [read_cli $fd]] set _ [format_output [read_cli $fd]]
} }
file delete ./.rediscli_history_test
proc test_interactive_cli_with_prompt {name code} { proc test_interactive_cli_with_prompt {name code} {
set ::env(FAKETTY_WITH_PROMPT) 1 set ::env(FAKETTY_WITH_PROMPT) 1
set ::env(REDISCLI_HISTFILE) ".rediscli_history_test"
test_interactive_cli $name $code test_interactive_cli $name $code
unset ::env(FAKETTY_WITH_PROMPT) unset ::env(FAKETTY_WITH_PROMPT)
} }
...@@ -839,3 +840,4 @@ start_server {tags {"cli external:skip"}} { ...@@ -839,3 +840,4 @@ start_server {tags {"cli external:skip"}} {
} }
} }
file delete ./.rediscli_history_test
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment