v1.0.3 Latest Latest

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

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




This section is empty.


This section is empty.


func AssertMetricsUnique added in v1.0.3

func AssertMetricsUnique(ch chan *prometheus.Desc, t *testing.T)

AssertMetricsUnique takes metric descriptions from a channel and asserts they are unique

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 PrepareErrorForTesting added in v1.0.3

func PrepareErrorForTesting(err error) connector.SSHCommandContext

PrepareErrorForTesting takes an error and returns a ssh command context that raises the error

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


This section is empty.

Jump to

Keyboard shortcuts

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