oficina / equipo Public

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

Plain git — no account needed to clone.

Download

Download this file

1package team
2
3import "testing"
4
5func TestSelfHealProjectInheritsTeamBudget(t *testing.T) {
6 e := newEnv(t)
7 b := periodSet()
8 b.Projects = nil
9 b.Team.Calls = 1
10 must(t, e.store.ConfigureBudgets(e.ctx, acctA, 0, b))
11 scope, h := periodJob(e, 17)
12 _, err := e.store.Intend(e.ctx, scope, h, intent("first", Usage{InputTokens: 1, OutputTokens: 1}))
13 must(t, err)
14 if periodUsage(e, 17).Reserved.Calls != 1 {
15 t.Fatal("inherited usage missing")
16 }
17 _, err = e.store.Intend(e.ctx, scope, h, intent("second", Usage{InputTokens: 1, OutputTokens: 1}))
18 wantCode(t, err, CodeBudget)
19}
20