(t *testing.T, logger slog.Logger, listenAddr string)
| 342 | var _ ServerStarter = NGINXServerOptions{} |
| 343 | |
| 344 | func (o NGINXServerOptions) StartServer(t *testing.T, logger slog.Logger, listenAddr string) { |
| 345 | host, nginxPortStr, err := net.SplitHostPort(listenAddr) |
| 346 | require.NoError(t, err) |
| 347 | |
| 348 | nginxPort, err := strconv.Atoi(nginxPortStr) |
| 349 | require.NoError(t, err) |
| 350 | |
| 351 | serverPort := nginxPort + 1 |
| 352 | serverListenAddr := net.JoinHostPort(host, strconv.Itoa(serverPort)) |
| 353 | |
| 354 | o.SimpleServerOptions.StartServer(t, logger, serverListenAddr) |
| 355 | startNginx(t, nginxPortStr, serverListenAddr) |
| 356 | } |
| 357 | |
| 358 | func startNginx(t *testing.T, listenPort, serverAddr string) { |
| 359 | cfg := `events {} |
nothing calls this directly
no test coverage detected