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

executiontest

package
v1.0.0-rc.12 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package executiontest is the conformance suite every TaskDriver passes. Its groups follow capabilities: the lifecycle group applies to every driver; the others run only for a driver that claims the capability. A fake driver passing the suite establishes contract behaviour, not backend support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lifecycle

func Lifecycle(t *testing.T, h Harness)

Lifecycle is what every driver provides: identity by key, idempotent creation, start, wait, output by cursor, stop, release, and refusal of requests it cannot honour.

func PrivateDocker

func PrivateDocker(t *testing.T, h Harness)

PrivateDocker is what a driver claiming private Docker refuses before creating anything: a limit left at zero, which is never unlimited, and services it could not tell apart from each other or from the daemon. What it runs is established by its backend's integration tests (internal/worker, private_integration_test.go).

func Run

func Run(t *testing.T, h Harness)

Run runs every group that applies to the harness's driver.

func UniqueKeys

func UniqueKeys(prefix string) func(string) string

UniqueKeys returns a Key function whose keys are unique to one run.

Types

type Harness

type Harness struct {
	Driver execution.TaskDriver
	Spec   func(key, output string, exit int, block bool) execution.TaskSpec
	// Key returns a key unique to this run of the suite.
	Key func(name string) string
}

Harness adapts the suite to one driver. Spec returns a task that prints output, then either exits with exit or, when block is true, runs until stopped.

Jump to

Keyboard shortcuts

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