testrecorder

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2021 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL