MCPcopy Create free account
hub / github.com/apache/kvrocks / StartTLSServer

Function StartTLSServer

tests/gocase/util/server.go:194–211  ·  view source on GitHub ↗
(t testing.TB, configs map[string]string)

Source from the content-addressed store, hash-verified

192}
193
194func StartTLSServer(t testing.TB, configs map[string]string) *KvrocksServer {
195 dir := *workspace
196 require.NotEmpty(t, dir, "please set the workspace by `-workspace`")
197 dir = filepath.Join(dir, "..", "tls", "cert")
198
199 configs["tls-cert-file"] = filepath.Join(dir, "server.crt")
200 configs["tls-key-file"] = filepath.Join(dir, "server.key")
201 configs["tls-ca-cert-file"] = filepath.Join(dir, "ca.crt")
202
203 addr, err := findFreePort()
204 require.NoError(t, err)
205 configs["tls-port"] = fmt.Sprintf("%d", addr.Port)
206
207 s := StartServer(t, configs)
208 s.tlsAddr = addr
209
210 return s
211}
212
213func StartServer(t testing.TB, configs map[string]string) *KvrocksServer {
214 return StartServerWithCLIOptions(t, true, configs, []string{})

Callers

nothing calls this directly

Calls 3

findFreePortFunction · 0.85
StartServerFunction · 0.85
JoinMethod · 0.45

Tested by

no test coverage detected