mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 18:54:58 +00:00
8d79702d8a
(cherry picked from commit f80f3f492a
)
20 lines
515 B
Tcl
20 lines
515 B
Tcl
proc rediscli_tls_config {testsdir} {
|
|
set tlsdir [file join $testsdir tls]
|
|
set cert [file join $tlsdir redis.crt]
|
|
set key [file join $tlsdir redis.key]
|
|
set cacert [file join $tlsdir ca.crt]
|
|
|
|
if {$::tls} {
|
|
return [list --tls --cert $cert --key $key --cacert $cacert]
|
|
} else {
|
|
return {}
|
|
}
|
|
}
|
|
|
|
proc rediscli {host port {opts {}}} {
|
|
set cmd [list src/redis-cli -h $host -p $port]
|
|
lappend cmd {*}[rediscli_tls_config "tests"]
|
|
lappend cmd {*}$opts
|
|
return $cmd
|
|
}
|