integrationtest

package module
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiffLogProtos

func DiffLogProtos(t testing.TB, x, y *protos.LogExpectFixture) string

Diff uses cmp.Diff(), protocmp, and some custom options to compare two protobuf messages.

func DiffMetricProtos

func DiffMetricProtos(t testing.TB, x, y *protos.MetricExpectFixture) string

Diff uses cmp.Diff(), protocmp, and some custom options to compare two protobuf messages.

func DiffTraceProtos

func DiffTraceProtos(t testing.TB, x, y *protos.TraceExpectFixture) string

Diff uses cmp.Diff(), protocmp, and some custom options to compare two protobuf messages.

func NewMetricTestExporter

func NewMetricTestExporter(
	ctx context.Context,
	t testing.TB,
	m *cloudmock.MetricsTestServer,
	cfg collector.Config,
) *collector.MetricsExporter

NewMetricsTestExporter creates and starts a googlecloud exporter by updating the given cfg copy to point to the test server.

Types

type InMemoryOCExporter

type InMemoryOCExporter struct {
	// contains filtered or unexported fields
}

OC stats/metrics exporter used to capture self observability metrics.

func NewInMemoryOCViewExporter

func NewInMemoryOCViewExporter() (*InMemoryOCExporter, error)

NewInMemoryOCViewExporter creates a new in memory OC exporter for testing. Be sure to defer a call to Shutdown().

func (*InMemoryOCExporter) Proto

func (*InMemoryOCExporter) Shutdown

func (i *InMemoryOCExporter) Shutdown(ctx context.Context) error

Shutdown unregisters the global OpenCensus views to reset state for the next test.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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