Documentation
¶
Index ¶
- func AssertEventTypeParity(t *testing.T, label string, expected, actual []agent.AgentEventType)
- func CountEventType(events []agent.AgentEvent, typ agent.AgentEventType) int
- func EventTypeSequence(events []agent.AgentEvent) []agent.AgentEventType
- func RequireDocker(t *testing.T)
- func RequireGVisor(t *testing.T)
- func RequireGVisorRuntime(t *testing.T)
- func RequireZFS(t *testing.T)
- func RequireZFSBackend(t *testing.T)
- func SandboxHostConfig(t *testing.T) (storageBackend, containerRuntime string)
- type BackendConfig
- type E2EReport
- type ReportSummary
- type ScenarioReport
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 ¶
RequireDocker fails the test if Docker is not available.
func RequireGVisor ¶
RequireGVisor fails the test if gVisor (runsc) is not available.
func RequireGVisorRuntime ¶
RequireGVisorRuntime fails the test if the configured runtime is not gVisor.
func RequireZFS ¶
RequireZFS fails the test if ZFS is not available on the host.
func RequireZFSBackend ¶
RequireZFSBackend fails the test if the configured backend is not ZFS.
func SandboxHostConfig ¶
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 ¶
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.