(t *testing.T)
| 36 | } |
| 37 | |
| 38 | func TestRegisterAndClean(t *testing.T) { |
| 39 | handlerCreated = true // this prevents goroutine from being started during the tests |
| 40 | |
| 41 | f1 := func() error { |
| 42 | return nil |
| 43 | } |
| 44 | f2 := func() error { |
| 45 | return nil |
| 46 | } |
| 47 | |
| 48 | RegisterCleaner(f1) |
| 49 | RegisterCleaner(f2) |
| 50 | |
| 51 | errl := clean() |
| 52 | assert.Len(t, errl, 0) |
| 53 | } |
| 54 | |
| 55 | func TestCancel(t *testing.T) { |
| 56 | handlerCreated = true // this prevents goroutine from being started during the tests |
nothing calls this directly
no test coverage detected