package checks import ( "context" "io" "os" "testing" "amadan.net/oficina/equipo/internal/runner/provider" ) type unprovenSandbox struct{} func (unprovenSandbox) Run(context.Context, Command, string, provider.ReadPolicy, io.Writer, io.Writer) (int, error) { return -1, provider.ErrUncertain } func (unprovenSandbox) Contained(string) bool { return false } func TestCheckNamespaceRetainsScratchWithoutProof(t *testing.T) { f := newFixture(t) f.e.sandbox = unprovenSandbox{} work, cleanup, err := f.e.scratch(context.Background(), baseID) must(t, err) cleanup() if _, err = os.Stat(work); err != nil { t.Fatal("removed checkout without containment proof") } }