Documentation
¶
Index ¶
- func AwaitPortClosed(port int, timeout time.Duration) error
- func BuildGoBinary(binaryName, packagePath string) (string, error)
- func BuildGoBinaryOnDemand(env, binaryName, packagePath string) (string, error)
- func FindProjectRoot() string
- func RequireRandomPorts(t testing.TB, count int) []int
- func RetrieveURL(c client.Client, nn types.NamespacedName, port int32, path string) (string, error)
- func ServiceHost(c client.Client, nn types.NamespacedName, port int32) (string, error)
- type OutBuffer
- type OutBuffers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AwaitPortClosed ¶
AwaitPortClosed waits until the port is no longer listening.
func BuildGoBinary ¶
BuildGoBinary builds a Go binary with the given name and package path.
func BuildGoBinaryOnDemand ¶
BuildGoBinaryOnDemand builds the binary unless the env variable is set. If the environment variable is set, it will use that path instead.
func FindProjectRoot ¶
func FindProjectRoot() string
FindProjectRoot finds the root of the project by looking for go.mod.
func RequireRandomPorts ¶
RequireRandomPorts returns random available ports.
func RetrieveURL ¶
func ServiceHost ¶
Types ¶
type OutBuffers ¶ added in v1.6.0
type OutBuffers []OutBuffer
OutBuffers allows you to reset all the buffers easily.
func CaptureOutput ¶ added in v1.6.0
func CaptureOutput(labels ...string) OutBuffers
CaptureOutput creates labeled OutBuffers in the same order as labels.
func DumpLogsOnFail ¶ added in v1.6.0
func DumpLogsOnFail(t testing.TB, labels ...string) OutBuffers
DumpLogsOnFail creates labeled OutBuffers in the same order as labels. The difference between this and CaptureOutput is that when the test fails, these are dumped for diagnosis
func (OutBuffers) Reset ¶ added in v1.6.0
func (s OutBuffers) Reset()
Directories
¶
| Path | Synopsis |
|---|---|
|
Package testotel provides test utilities for OpenTelemetry tests.
|
Package testotel provides test utilities for OpenTelemetry tests. |