diff options
author | filipe oliveira <filipecosta.90@gmail.com> | 2020-10-28 06:00:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-28 08:00:54 +0200 |
commit | 39436b21527d878f23eef0bd64edbff47af073c5 (patch) | |
tree | 96a6e2384a2a6aa6a66102a45e421404dc505061 /tests | |
parent | 66037309c63c53a28c9553070a4557fabb84ed5a (diff) | |
download | redis-39436b21527d878f23eef0bd64edbff47af073c5.tar.gz |
TLS Support for redis-benchmark (#7959)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/support/benchmark.tcl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/support/benchmark.tcl b/tests/support/benchmark.tcl index 1130c9992..ed75bfeda 100644 --- a/tests/support/benchmark.tcl +++ b/tests/support/benchmark.tcl @@ -1,5 +1,19 @@ +proc redisbenchmark_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 redisbenchmark {host port {opts {}}} { set cmd [list src/redis-benchmark -h $host -p $port] + lappend cmd {*}[redisbenchmark_tls_config "tests"] lappend cmd {*}$opts return $cmd } |