MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestNoopUsageTracker_AlwaysAllows

Function TestNoopUsageTracker_AlwaysAllows

internal/usage/usage_test.go:17–25  ·  view source on GitHub ↗

-- NoopUsageTracker tests (no DB needed) --

(t *testing.T)

Source from the content-addressed store, hash-verified

15// -- NoopUsageTracker tests (no DB needed) --
16
17func TestNoopUsageTracker_AlwaysAllows(t *testing.T) {
18 tracker := usage.NewNoopUsageTracker()
19 ctx := context.Background()
20
21 allowed, err := tracker.RecordAndCheck(ctx, "user1", "agent1", "test.com", "outbound")
22 if err != nil || !allowed {
23 t.Errorf("RecordAndCheck: allowed=%v, err=%v", allowed, err)
24 }
25}
26
27// -- Store tests (DB required) --
28

Callers

nothing calls this directly

Calls 2

RecordAndCheckMethod · 0.95
NewNoopUsageTrackerFunction · 0.92

Tested by

no test coverage detected