Documentation ¶
Index ¶
- type TestMetricsRecorder
- func (tr *TestMetricsRecorder) AssertExactObservedStatuses(t *testing.T, uuid string, expectedStatuses ...tasks.Status)
- func (tr *TestMetricsRecorder) AssertObservedStatuses(t *testing.T, uuid string, expectedStatuses ...tasks.Status)
- func (tr *TestMetricsRecorder) Handler() http.Handler
- func (tr *TestMetricsRecorder) ObserveTask(task tasks.Task) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestMetricsRecorder ¶
type TestMetricsRecorder struct {
// contains filtered or unexported fields
}
TestMetricsRecorder recorder is a metrics recorder that allows you to assert expected behavior for the metrics library
func NewTestMetricsRecorder ¶
func NewTestMetricsRecorder() *TestMetricsRecorder
NewTestMetricsRecorder constructs a new test metrics recorder
func (*TestMetricsRecorder) AssertExactObservedStatuses ¶
func (tr *TestMetricsRecorder) AssertExactObservedStatuses(t *testing.T, uuid string, expectedStatuses ...tasks.Status)
AssertExactObservedStatuses asserts the the expected statuses we the exact statuses observed for the given task, in order, with no other statuses observed
func (*TestMetricsRecorder) AssertObservedStatuses ¶
func (tr *TestMetricsRecorder) AssertObservedStatuses(t *testing.T, uuid string, expectedStatuses ...tasks.Status)
AssertObservedStatuses asserts that the given statuses were among those observed for the given task
func (*TestMetricsRecorder) Handler ¶
func (tr *TestMetricsRecorder) Handler() http.Handler
func (*TestMetricsRecorder) ObserveTask ¶
func (tr *TestMetricsRecorder) ObserveTask(task tasks.Task) error
Click to show internal directories.
Click to hide internal directories.