Something went wrong. Try again.
A Kubernetes operator that runs Claude Code sessions on long-horizon work
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930package operator_test
import ( "slices" "testing" "testing/synctest"
"tangled.org/guid.foo/simmer/dataplane")
// A Mandate with a workspace from the scope starts a Session whose// turns clone the repository of the event's scope first.func TestATurnClonesTheRepositoryOfItsEventsScope(t *testing.T) { synctest.Test(t, func(t *testing.T) { m := ops() m.Spec.Workspace.FromScope = map[string]string{"alerts": "ssh://git@forge.example/shop/{scope}.git"} r := startWith(t, roomy(), m, triage()) r.pass(t) r.pass(t) s := r.only(t)
turn, err := r.o.Turn(t.Context(), dataplane.SessionRef{Namespace: "telemetry", Name: s.Metadata.Name})
want := append([]string{"ssh://git@forge.example/shop/assistant.git"}, m.Spec.Workspace.Repositories...) if err != nil || !slices.Equal(turn.Repositories, want) { t.Errorf("turn clones %v, %v; want %v", turn.Repositories, err, want) } })}