Help us shape the future of Go! Take the 2026 Go Developer Survey

testengine

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package testengine runs a real go-wasmcontainers engine in the test's process: the daemon with the wazero executor and an in-memory image store, its API handler, and a registry serving the demo images (built for wasip1 at test time). The dashboard reaches it through the same bridge the browser uses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasShell added in v0.7.0

func HasShell(tb testing.TB)

HasShell skips tb unless the shell image could be mirrored.

func Modules

func Modules(tb testing.TB) map[string][]byte

Modules compiles the demo images once per process.

func Root

func Root() string

Root is this module's root directory.

Types

type Engine

type Engine struct {
	// Handler is the engine's API.
	Handler http.Handler
	// Client reaches Handler through the bridge, as the page does.
	Client *http.Client
	// Bridge is the server end of the bridge.
	Bridge *bridge.Server
}

Engine is a running engine.

func New

func New(tb testing.TB, extra ...string) *Engine

New starts an engine whose registry mirror serves the demo images under their familiar names (hello, clock, fail), and hello's module again under each of the extra names.

Jump to

Keyboard shortcuts

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