cli.tcl 501 B

12345678910111213141516171819
  1. proc rediscli_tls_config {testsdir} {
  2. set tlsdir [file join $testsdir tls]
  3. set cert [file join $tlsdir redis.crt]
  4. set key [file join $tlsdir redis.key]
  5. set cacert [file join $tlsdir ca.crt]
  6. if {$::tls} {
  7. return [list --tls --cert $cert --key $key --cacert $cacert]
  8. } else {
  9. return {}
  10. }
  11. }
  12. proc rediscli {port {opts {}}} {
  13. set cmd [list src/redis-cli -p $port]
  14. lappend cmd {*}[rediscli_tls_config "tests"]
  15. lappend cmd {*}$opts
  16. return $cmd
  17. }