(t testing.TB, configs map[string]string)
| 192 | } |
| 193 | |
| 194 | func 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 | |
| 213 | func StartServer(t testing.TB, configs map[string]string) *KvrocksServer { |
| 214 | return StartServerWithCLIOptions(t, true, configs, []string{}) |
nothing calls this directly
no test coverage detected