--------------------------------------------------------------------------- Tests ---------------------------------------------------------------------------
(t *testing.T)
| 324 | if err := db.QueryRow("SELECT 1").Scan(&result); err != nil { |
| 325 | t.Fatalf("SELECT 1 failed: %v", err) |
| 326 | } |
| 327 | if result != 1 { |
| 328 | t.Fatalf("Expected 1, got %d", result) |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | func TestControlPlaneConnectionWaitsForDelayedStartup(t *testing.T) { |
| 333 | h := startControlPlane(t, defaultOpts()) |
| 334 | if err := h.sendSignal(syscall.SIGSTOP); err != nil { |
| 335 | t.Fatalf("Pause control plane: %v", err) |
| 336 | } |
| 337 | dialer := &delayedStartupDialer{connected: make(chan struct{})} |
| 338 | stopDelay := make(chan struct{}) |
| 339 | resumeErr := make(chan error, 1) |
| 340 | go func() { |
nothing calls this directly
no test coverage detected