feat: harden growth report orchestration

This commit is contained in:
2026-08-21 00:43:33 +03:30
parent dd0ae15a95
commit d00700ffb8
5 changed files with 54 additions and 14 deletions

View File

@@ -20,10 +20,7 @@ func TestCoordinatorFallsBackToBoundedProcessCounters(t *testing.T) {
if err := coordinator.AllowCreate(context.Background(), 7, now); !errors.Is(err, ErrRateLimited) {
t.Fatalf("third request error=%v", err)
}
if err := coordinator.ReserveBudget(context.Background(), 1600, now); err != nil {
t.Fatal(err)
}
if err := coordinator.ReserveBudget(context.Background(), 1, now); !errors.Is(err, ErrBudgetExhausted) {
t.Fatalf("second budget error=%v", err)
if err := coordinator.ReserveBudget(context.Background(), 1600, now); !errors.Is(err, ErrBudgetExhausted) {
t.Fatalf("budget without Redis error=%v", err)
}
}