(t *testing.T)
| 99 | } |
| 100 | |
| 101 | func TestTracker_FailRecordsError(t *testing.T) { |
| 102 | t.Parallel() |
| 103 | |
| 104 | errBoom := errors.New("transport reset") |
| 105 | tr := lifecycle.NewTracker() |
| 106 | tr.Fail(lifecycle.StateRestarting, errBoom) |
| 107 | |
| 108 | snap := tr.Snapshot() |
| 109 | assert.Check(t, is.Equal(snap.State, lifecycle.StateRestarting)) |
| 110 | assert.Check(t, is.Equal(snap.LastError, errBoom)) |
| 111 | } |
| 112 | |
| 113 | func TestTracker_RestartCounter(t *testing.T) { |
| 114 | t.Parallel() |
nothing calls this directly
no test coverage detected