oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package checks
2
3import (
4 "context"
5 "io"
6 "os"
7 "testing"
8
9 "amadan.net/oficina/equipo/internal/runner/provider"
10)
11
12type unprovenSandbox struct{}
13
14func (unprovenSandbox) Run(context.Context, Command, string, provider.ReadPolicy, io.Writer, io.Writer) (int, error) {
15 return -1, provider.ErrUncertain
16}
17func (unprovenSandbox) Contained(string) bool { return false }
18
19func TestCheckNamespaceRetainsScratchWithoutProof(t *testing.T) {
20 f := newFixture(t)
21 f.e.sandbox = unprovenSandbox{}
22 work, cleanup, err := f.e.scratch(context.Background(), baseID)
23 must(t, err)
24 cleanup()
25 if _, err = os.Stat(work); err != nil {
26 t.Fatal("removed checkout without containment proof")
27 }
28}
29