File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 1+ FROM golang:latest AS builder
2+ COPY . /
3+ WORKDIR /
4+ RUN make
5+
6+ FROM ubuntu:24.10
7+ LABEL Description="redis-benchmark-go"
8+ COPY --from=builder /redis-benchmark-go /usr/local/bin
9+
10+ ENTRYPOINT ["redis-benchmark-go" ]
11+ CMD [ "--help" ]
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package main
22
33import (
44 "context"
5- tls "crypto/tls"
5+ "crypto/tls"
66 "flag"
77 "fmt"
88 "log"
@@ -185,6 +185,7 @@ func main() {
185185 username := flag .String ("u" , "" , "Username for Redis Auth." )
186186 password := flag .String ("a" , "" , "Password for Redis Auth." )
187187 enableTls := flag .Bool ("tls" , false , "Use TLS connection." )
188+ tlsSkipCertCheck := flag .Bool ("tls-skip" , false , "Ignore TLS certificate check" )
188189 jsonOutFile := flag .String ("json-out-file" , "" , "Results file. If empty will not save." )
189190 seed := flag .Int64 ("random-seed" , 12345 , "random seed to be used." )
190191 clients := flag .Uint64 ("c" , 50 , "number of clients." )
@@ -292,11 +293,12 @@ func main() {
292293 alwaysRESP2 = false
293294 }
294295 if * enableTls {
296+ conf := & tls.Config {
297+ InsecureSkipVerify : * tlsSkipCertCheck ,
298+ }
295299 opts .NetDialer = & tls.Dialer {
296300 NetDialer : nil ,
297- Config : & tls.Config {
298- ServerName : * host ,
299- },
301+ Config : conf ,
300302 }
301303 }
302304
You can’t perform that action at this time.
0 commit comments