backendtest

package
v0.0.0-...-31ecaa2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: GPL-3.0, GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package backendtest provides a reusable black-box lifecycle suite for audited isolated-execution backend implementations. Passing this suite is necessary but does not by itself prove kernel, network, GPU, or filesystem isolation; those properties still require privileged platform tests.

Index

Constants

View Source
const (
	MaxConformanceConcurrency = 32
	MaxConformanceTimeout     = 30 * time.Second
)

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, suite Suite)

Run executes readiness, successful cleanup, cancellation cleanup, and concurrent cleanup checks against fresh backend instances. A cancellation fixture must remain active until its context is canceled.

Types

type Factory

type Factory func(context.Context) (Backend, Inspector, error)

type Inspector

type Inspector interface {
	Snapshot(context.Context) (Snapshot, error)
}

type Snapshot

type Snapshot struct {
	ActiveWorkloads int
	Containers      int
	Tasks           int
	Snapshots       int
}

Snapshot is a backend-namespace inventory taken through an independently reviewed administrative test adapter. Residual counts include both active and stopped objects retained by the tested execution.

type Suite

type Suite struct {
	New                 Factory
	SuccessRequest      executor.ContainerRequest
	SuccessInput        []byte
	ExpectedOutput      []byte
	CancellationRequest executor.ContainerRequest
	CancellationInput   []byte
	StartTimeout        time.Duration
	ReturnTimeout       time.Duration
	InspectTimeout      time.Duration
	Concurrency         int
}

Jump to

Keyboard shortcuts

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