common

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEventTypeParity

func AssertEventTypeParity(t *testing.T, label string, expected, actual []agent.AgentEventType)

AssertEventTypeParity checks that two event sequences have the same event types in order.

func CountEventType

func CountEventType(events []agent.AgentEvent, typ agent.AgentEventType) int

CountEventType counts occurrences of a specific event type.

func EventTypeSequence

func EventTypeSequence(events []agent.AgentEvent) []agent.AgentEventType

EventTypeSequence extracts the event type sequence from a list of agent events.

func RequireDocker

func RequireDocker(t *testing.T)

RequireDocker fails the test if Docker is not available.

func RequireGVisor

func RequireGVisor(t *testing.T)

RequireGVisor fails the test if gVisor (runsc) is not available.

func RequireGVisorRuntime

func RequireGVisorRuntime(t *testing.T)

RequireGVisorRuntime fails the test if the configured runtime is not gVisor.

func RequireZFS

func RequireZFS(t *testing.T)

RequireZFS fails the test if ZFS is not available on the host.

func RequireZFSBackend

func RequireZFSBackend(t *testing.T)

RequireZFSBackend fails the test if the configured backend is not ZFS.

func SandboxHostConfig

func SandboxHostConfig(t *testing.T) (storageBackend, containerRuntime string)

SandboxHostConfig returns the configured storage backend and container runtime from environment variables, with defaults.

Types

type BackendConfig

type BackendConfig struct {
	Name             string
	StorageBackend   native.StorageBackend
	ContainerRuntime native.ContainerRuntime
}

BackendConfig represents a named backend configuration for testing.

func StandardConfigs

func StandardConfigs() []BackendConfig

StandardConfigs returns the four standard backend configurations (C1-C4).

func (BackendConfig) SupportsSnapshots

func (c BackendConfig) SupportsSnapshots() bool

SupportsSnapshots returns whether this config supports snapshots.

func (BackendConfig) SupportsTierRouting

func (c BackendConfig) SupportsTierRouting() bool

SupportsTierRouting returns whether this config supports tier routing.

type E2EReport

type E2EReport struct {
	Tier      string           `json:"tier"`
	StartedAt time.Time        `json:"started_at"`
	Duration  time.Duration    `json:"duration"`
	Scenarios []ScenarioReport `json:"scenarios"`
	Summary   ReportSummary    `json:"summary"`
}

E2EReport captures the results of an E2E test run for a given tier.

func (*E2EReport) WriteReport

func (r *E2EReport) WriteReport(dir string) error

WriteReport writes the report to a JSON file in the given directory.

type ReportSummary

type ReportSummary struct {
	Total   int `json:"total"`
	Passed  int `json:"passed"`
	Failed  int `json:"failed"`
	Skipped int `json:"skipped"`
}

ReportSummary provides aggregate counts for a test run.

type ScenarioReport

type ScenarioReport struct {
	Name       string        `json:"name"`
	Mode       string        `json:"mode"`
	Passed     bool          `json:"passed"`
	Duration   time.Duration `json:"duration"`
	EventCount int           `json:"event_count"`
	Error      string        `json:"error,omitempty"`
}

ScenarioReport captures the result of a single test scenario.

Jump to

Keyboard shortcuts

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