testutils

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertMetricsDouble added in v0.47.0

func AssertMetricsDouble(t *testing.T, actualMetric *metricspb.Metric, expectedMetric string,
	expectedType metricspb.MetricDescriptor_Type, expectedValue float64)

func AssertMetricsInt added in v0.47.0

func AssertMetricsInt(t *testing.T, actualMetric *metricspb.Metric, expectedMetric string,
	expectedType metricspb.MetricDescriptor_Type, expectedValue int64)

func AssertMetricsWithLabels

func AssertMetricsWithLabels(t *testing.T, actualMetric *metricspb.Metric,
	expectedMetric string, expectedType metricspb.MetricDescriptor_Type,
	expectedLabels map[string]string, expectedValue int64)

func AssertResource

func AssertResource(t *testing.T, actualResource *resourcepb.Resource,
	expectedType string, expectedLabels map[string]string)

Types

type MockStore

type MockStore struct {
	cache.Store
	WantErr bool
	Cache   map[string]interface{}
}

func (*MockStore) GetByKey

func (ms *MockStore) GetByKey(id string) (interface{}, bool, error)

func (*MockStore) List

func (ms *MockStore) List() []interface{}

Jump to

Keyboard shortcuts

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