test

package
v0.74.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertMetric

func AssertMetric(t *testing.T, metrics []metricdata.Metrics, expectedName string)

AssertMetric asserts that a metric with the given name is present in the list of metrics.

func AssertSpan

func AssertSpan(t *testing.T, expected tracetest.SpanStub, got tracetest.SpanStub)

AssertSpan asserts that the expected span is equal to the got span.

func SetupMetrics

func SetupMetrics(ctx context.Context, t *testing.T) (ShutdownFunc, CollectMetricsFunc)

SetupMetrics sets up the metrics provider and reader for testing.

Types

type CollectMetricsFunc

type CollectMetricsFunc func(expected int) *metricdata.ResourceMetrics

type ShutdownFunc

type ShutdownFunc func()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳