e2e

package
v0.0.0-...-bc79f38 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LogLevel is used to set the level for the zap logger.
	LogLevel = getStringEnv("LOG_LEVEL", "info")
)

Functions

func CreateTempFile

func CreateTempFile(t *testing.T) *os.File

CreateTempFile creates a temp file.

func GetFreePort

func GetFreePort(t *testing.T) string

GetFreePort will return a free tcp port.

func GetLogger

func GetLogger(t *testing.T) zap.SugaredLogger

GetLogger returns a Zap Sugared logger.

func GetPrometheusCounter

func GetPrometheusCounter(t *testing.T, metricsEndpoint, metricName string) float64

GetPrometheusCounter returns the counter named from the specified endpoint.

func GetPrometheusMetric

func GetPrometheusMetric(t *testing.T, metricsEndpoint, metricName string) pcm.MetricFamily

GetPrometheusMetric returns the metric named from the specified endpoint.

func GetPrometheusMetrics

func GetPrometheusMetrics(t *testing.T, metricsEndpoint string) map[string]pcm.MetricFamily

GetPrometheusMetrics returns all metrics from the specified endpoint.

func StartCollector

func StartCollector(t *testing.T, logger zap.SugaredLogger, executable, configFileName string, loggerOutput io.Writer, metricsPort string) *exec.Cmd

StartCollector starts the executable in background.

Types

This section is empty.

Jump to

Keyboard shortcuts

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