(t *testing.T)
| 70 | } |
| 71 | |
| 72 | func fakeInterrupt(t *testing.T) func() { |
| 73 | oldNotify := notifySignal |
| 74 | notifySignal = func(c chan<- os.Signal, sig ...os.Signal) { |
| 75 | assert.Contains(t, sig, os.Interrupt) |
| 76 | go func() { |
| 77 | time.Sleep(100 * time.Millisecond) |
| 78 | c <- os.Interrupt |
| 79 | }() |
| 80 | } |
| 81 | return func() { |
| 82 | notifySignal = oldNotify |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | func fakeShutdownError(err error) func() { |
| 87 | old := serverShutdown |
no outgoing calls
no test coverage detected