MCPcopy Create free account
hub / github.com/InferCore/InferCore / TestBasicEngine_BudgetExceeded

Function TestBasicEngine_BudgetExceeded

internal/policy/basic_engine_test.go:95–108  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestBasicEngine_BudgetExceeded(t *testing.T) {
96 engine := NewBasicEngine(testConfig())
97 decision, err := engine.Evaluate(context.Background(), types.AIRequest{
98 TenantID: "team-a",
99 TaskType: "simple",
100 Options: types.RequestOptions{MaxTokens: 2000},
101 })
102 if err != nil {
103 t.Fatalf("unexpected error: %v", err)
104 }
105 if decision.Allowed {
106 t.Fatalf("expected budget rejection")
107 }
108}

Callers

nothing calls this directly

Calls 3

EvaluateMethod · 0.95
NewBasicEngineFunction · 0.85
testConfigFunction · 0.70

Tested by

no test coverage detected