testhelper

package
v0.0.0-...-b274fa0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecDockerJobHCL

func ExecDockerJobHCL(t *testing.T) string

func PromQueryActiveInstances

func PromQueryActiveInstances(ctx context.Context, addr string, job string) ([]string, error)

func PromQueryAlive

func PromQueryAlive(ctx context.Context, addr string, job string, metric string, count int) error

PromQueryAlive makes sure that the job has count target instances and that the chosen canary metric is present for all of them.

func PromQueryVector

func PromQueryVector(ctx context.Context, addr string, job string, metric string) ([]float64, error)

func TestNomadJobs

func TestNomadJobs(t *testing.T, ctx context.Context, consulCli *consulapi.Client,
	nomadCli *nomadapi.Client, name, jobhcl string, tester func(ctx context.Context, addr string) error)

TestNomadJobs exercises a Consul/Nomad/Prometheus cluster by registering jobhcl as a Nomad job.

func TestPrometheus

func TestPrometheus(ctx context.Context, promaddr string) error

func UntilPass

func UntilPass(t *testing.T, ctx context.Context, f func() error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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