ptest

package
v0.0.0-...-be347a3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestMetricSet

func TestMetricSet(t *testing.T, module, metricset string, cases TestCases)

TestMetricSet goes over the given TestCases and ensures that source Prometheus metrics gets converted into the expected events when passed by the given metricset. If -update_expected flag is passed, the expected JSON file will be updated with the result

func TestMetricSetEventsFetcher

func TestMetricSetEventsFetcher(t *testing.T, module, metricset string, cases TestCases)

TestMetricSetEventsFetcher goes over the given TestCases and ensures that source Prometheus metrics gets converted into the expected events when passed by the given metricset. If -update_expected flag is passed, the expected JSON file will be updated with the result

Types

type TestCases

type TestCases []struct {
	// MetricsFile containing Prometheus outputted metrics
	MetricsFile string

	// ExpectedFile containing resulting documents
	ExpectedFile string
}

TestCases holds the list of test cases to test a metricset

Jump to

Keyboard shortcuts

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