Documentation
¶
Overview ¶
Package e2e implements the orchestration loop for `ork e2e`.
A Runner executes a declarative E2E spec through its full lifecycle:
- Cluster provisioning (kind) — skipped when --use-current or --cluster is set
- CRD apply
- Optional setup manifests
- Bundle generate + apply
- Orkestra helm install
- CR apply
- Expectation polling
- Teardown — always runs for non-owned clusters (--use-current, --cluster); for owned clusters only when --keep-cluster is absent
Teardown reverses every applied resource in the correct order: CR delete → helm uninstall → bundle delete → setup (reverse) → CRDs. This keeps borrowed clusters clean regardless of pass/fail.
Run returns a *Result with per-case timings that callers (e.g. registry push) embed as OCI annotations.
Index ¶
Constants ¶
const (
// DevServerAddr is the in-cluster DNS address CR specs should use.
DevServerAddr = "http://orkestra-dev-server.orkestra-system.svc:9999"
)
Variables ¶
This section is empty.
Functions ¶
func BuildDiscoveryE2E ¶ added in v0.6.6
BuildDiscoveryE2E constructs an in-memory E2E aggregator from a list of discovered file paths. wait is injected on every import except the first.
func DiscoverE2EFiles ¶ added in v0.6.6
DiscoverE2EFiles walks root recursively and returns paths to all *e2e.yaml files that are not pure aggregators (files with imports: but no spec:). Results are sorted for deterministic order. skip is a list of glob patterns (matched against the full path); any file whose path matches is excluded.
func ValidateImports ¶ added in v0.6.5
ValidateImports checks that every file listed in imports exists and declares kind: E2E. baseDir is the directory that relative paths are resolved against. Returns one error per invalid import — callers may print all of them.
Types ¶
type CaseResult ¶
CaseResult holds the outcome of a single expectation.
type ImportResult ¶ added in v0.6.6
type ImportResult struct {
// Path is the import path as declared in imports: (e.g. "./01-basic/e2e.yaml").
Path string
// Result is the structured outcome. Nil when the import failed to load or
// the runner itself errored before producing any expectations.
Result *Result
// Err is non-nil when the import failed (load error, Orkestra not ready,
// or one or more expectations failed).
Err error
}
ImportResult holds the outcome of one imported E2E file in a suite run.
func (ImportResult) Name ¶ added in v0.6.6
func (i ImportResult) Name() string
Name returns the display name — the E2E metadata.name when available, otherwise the import path.
func (ImportResult) Passed ¶ added in v0.6.6
func (i ImportResult) Passed() bool
Passed reports whether this import succeeded.
type Result ¶
type Result struct {
Name string
Cases []CaseResult
Elapsed time.Duration
}
Result holds the outcome of a complete E2E run. It is returned by Run and consumed by ork registry push to embed verification metadata into OCI annotations.
func (*Result) Duration ¶
Duration returns the total elapsed time as a human-readable string (e.g. "45s").
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner executes a single E2E spec end-to-end.