(t *testing.T)
| 67 | } |
| 68 | |
| 69 | func TestCheckAndStoreEvery(t *testing.T) { |
| 70 | f := new(fake) |
| 71 | c := Checkup{Storage: f, Checkers: []Checker{f}} |
| 72 | |
| 73 | ticker := c.CheckAndStoreEvery(50 * time.Millisecond) |
| 74 | time.Sleep(170 * time.Millisecond) |
| 75 | ticker.Stop() |
| 76 | |
| 77 | f.Lock() |
| 78 | defer f.Unlock() |
| 79 | if got, want := f.checked, 3; got != want { |
| 80 | t.Errorf("Expected %d checks while sleeping, had: %d", want, got) |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | func TestComputeStats(t *testing.T) { |
| 85 | s := types.Result{Times: []types.Attempt{ |
nothing calls this directly
no test coverage detected