scrapertest

package module
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareMetricSlices

func CompareMetricSlices(expected, actual pdata.MetricSlice, options ...CompareOption) error

CompareMetricSlices compares each part of two given MetricSlices and returns an error if they don't match. The error describes what didn't match. The expected and actual values are clones before options are applied.

func CompareNumberDataPointSlices

func CompareNumberDataPointSlices(actual, expected pdata.NumberDataPointSlice) error

CompareNumberDataPointSlices compares each part of two given NumberDataPointSlices and returns an error if they don't match. The error describes what didn't match.

func CompareNumberDataPoints

func CompareNumberDataPoints(actual, expected pdata.NumberDataPoint) error

CompareNumberDataPoints compares each part of two given NumberDataPoints and returns an error if they don't match. The error describes what didn't match.

func ReadExpected

func ReadExpected(filePath string) (pdata.Metrics, error)

func WriteExpected

func WriteExpected(filePath string, metrics pdata.Metrics) error

Types

type CompareOption added in v0.41.0

type CompareOption interface {
	// contains filtered or unexported methods
}

CompareOption is applied by the CompareMetricSlices function to mutates an expected and/or actual result before comparing.

func IgnoreValues added in v0.41.0

func IgnoreValues() CompareOption

IgnoreValues is a CompareOption that clears all values

Jump to

Keyboard shortcuts

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