Skip to content
Source on GitHub (opens in a new tab)
import "github.com/barevoidco/zelk/core/env/envtest"

Package envtest checks third-party environments against zelk’s portable file and cancellation contract. Factories own environment cleanup.

func Run(t *testing.T, factory Factory)

Run checks portable reads, conditional writes, searches, path confinement and cancellation. Process execution and claimed enforcement need implementation- specific integration tests, since executable availability is host-defined.

type Factory func(t *testing.T) env.Environment

Factory returns a fresh writable environment with an empty workspace for each case. It registers cleanup with t and must support concurrent method calls.