testutils

package
v0.0.0-...-34cbb95 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRecordedMetric

func GetRecordedMetric(t sktest.TestingT, metricName string, tags map[string]string) string

GetRecordedMetric returns the value that prometheus is reporting. Using this allows for unit tests to check that metrics are properly being calculated and sent. This approach was found to be less awkward than using mocks and is decently performant. See datahopper/bot_metrics/bots_test.go for an example use.

Types

This section is empty.

Jump to

Keyboard shortcuts

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