Documentation
¶
Overview ¶
Package emutest starts an in-process gcpemu instance for Go tests (FR-CI-009). Every port is allocated dynamically and state is ephemeral.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequireRuntime ¶
RequireRuntime skips the test unless a container runtime is available (and GCPEMU_SKIP_CONTAINER_TESTS is unset), and makes a static gcpemu binary available for in-container agents.
Types ¶
type Instance ¶
Instance is a running test emulator.
func Start ¶
Start launches an instance running services (plus dependencies) and stops it when the test ends. Set GCPEMU_TEST_LOG=1 to see emulator logs.
func (*Instance) Endpoint ¶
Endpoint returns the address (host:port) of a named listener, e.g. "gateway", "gcs", "pubsub".
func (*Instance) GatewayURL ¶
GatewayURL returns "http://<gateway>".
type Option ¶
Option customises the configuration before start.
func WithDeterministic ¶
func WithDeterministic() Option
WithDeterministic enables deterministic IDs and the fake clock.