(t *testing.T)
| 234 | } |
| 235 | |
| 236 | func TestShutdownManagerName(t *testing.T) { |
| 237 | c := make(chan int, 100) |
| 238 | gs := New() |
| 239 | |
| 240 | gs.AddShutdownCallback(ShutdownFunc(func(shutdownManager string) error { |
| 241 | if shutdownManager == "test-sm" { |
| 242 | c <- 1 |
| 243 | } |
| 244 | return nil |
| 245 | })) |
| 246 | |
| 247 | gs.StartShutdown(SMFinishFunc(func() error { |
| 248 | return nil |
| 249 | })) |
| 250 | |
| 251 | if len(c) != 1 { |
| 252 | t.Error("Expected shutdownManager to be 'test-sm'.") |
| 253 | } |
| 254 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…