testenvironment

package
v0.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartAndAwaitReady

func StartAndAwaitReady(t testing.TB, cmd *exec.Cmd, stdout, stderr io.Writer, readyMessage string)

StartAndAwaitReady takes a prepared exec.Cmd, assigns stdout and stderr to out, and starts it. This blocks on the readyMessage.

Types

type TestEnvironment

type TestEnvironment struct {
	// contains filtered or unexported fields
}

TestEnvironment holds all the services needed for tests.

func StartTestEnvironment

func StartTestEnvironment(t testing.TB,
	requireNewUpstream func(t testing.TB, out io.Writer, miscPorts map[string]int), miscPortDefauls map[string]int,
	extprocBin, extprocConfig string, extprocEnv []string, envoyConfig string, okToDumpLogOnFailure, extProcInProcess bool,
	mcpWriteTimeout time.Duration,
) *TestEnvironment

StartTestEnvironment starts all required services and returns ports and a closer.

If extProcInProcess is true, then this starts the extproc in-process by directly calling mainlib.Main instead of the built binary. This allows the benchmark test suite to directly do the profiling without the extroc.

func (*TestEnvironment) EnvoyListenerPort

func (e *TestEnvironment) EnvoyListenerPort() int

func (*TestEnvironment) EnvoyStdout

func (e *TestEnvironment) EnvoyStdout() string

EnvoyStdout returns the content of Envoy's stdout (e.g. the access log).

func (*TestEnvironment) ExtProcAdminPort added in v0.4.0

func (e *TestEnvironment) ExtProcAdminPort() int

func (*TestEnvironment) LogOutput

func (e *TestEnvironment) LogOutput(t testing.TB)

Jump to

Keyboard shortcuts

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