oficina / equipo Public

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

Plain git — no account needed to clone.

Download

Download this file

1package codex
2
3import (
4 "amadan.net/oficina/equipo/internal/runner/provider"
5 "testing"
6)
7
8func TestEngineeringGoPolicyRoundTrip(t *testing.T) {
9 f := fixtureFor(t)
10 in, _, err := policyInputs(f.launch.Policy)
11 if err != nil {
12 t.Fatal(err)
13 }
14 profile, _ := provider.Profile("implement")
15 in.Action = "implement"
16 in.Tools = profile.MCPTools()
17 for _, target := range []string{"/opt/go", "/opt/go-mod"} {
18 in.RuntimeFiles = append(in.RuntimeFiles, provider.Mount{Source: t.TempDir(), Target: target, ReadOnly: true})
19 }
20 in, err = PolicyInputs(f.launch.Binding, in, f.launch.Selection.Model)
21 if err != nil {
22 t.Fatal(err)
23 }
24 p, err := provider.BuildPolicy(f.launch.Binding, in)
25 if err != nil {
26 t.Fatal(err)
27 }
28 if _, err = f.l.validatePolicy(f.launch.Binding, p); err != nil {
29 t.Fatal(err)
30 }
31 if p.Env["GOCACHE"] != "/tmp/go-build" || p.Env["GOTMPDIR"] != "/tmp/go-tmp" || p.Env["GOPROXY"] != "off" || p.Env["PATH"] != "/opt/go/bin:/usr/bin:/bin:/opt" {
32 t.Fatal("offline Go environment missing")
33 }
34}
35