util

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareMetrics

func CompareMetrics(got map[string]float64, expected map[string]float64, t *testing.T)

CompareMetrics asserts all metrics that are expected are present and checks their value It does not complain about additional metrics being present

func PrepareMetricsForTesting

func PrepareMetricsForTesting(ch chan prometheus.Metric, t *testing.T) map[string]float64

PrepareMetricsForTesting takes metrics from a channel and converts them to a map, mapping the metric (format `metric_example{label1=foo,bar=asdf}`) to it's value.

func PrepareOutputForTesting

func PrepareOutputForTesting(input string) connector.SSHCommandContext

PrepareOutputForTesting takes a string and returns a ssh command context that reads the input linewise

func Str2float64

func Str2float64(str string) float64

Str2float64 converts a string to float64

Types

This section is empty.

Jump to

Keyboard shortcuts

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