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

Function newReviewAPI

internal/agent/inbound_review_core_test.go:49–59  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func newReviewAPI(t *testing.T) (*agent.API, *identity.Store, *pgxpool.Pool, *capturePublisher) {
50 t.Helper()
51 pool := testutil.TestDB(t)
52 store := identity.NewStore(pool)
53 smtpRelay := outbound.NewSMTPRelay(&config.OutboundSMTPConfig{})
54 sender := outbound.NewSender(smtpRelay, "test.e2a.dev")
55 api := agent.NewAPI(store, sender, smtpRelay, nil, usage.NewNoopUsageTracker(), "e2a.dev", "test.e2a.dev", "agents.e2a.dev", "", false)
56 cap := &capturePublisher{}
57 api.SetPublisher(cap)
58 return api, store, pool, cap
59}
60
61func seedHeldInbound(t *testing.T, store *identity.Store, ctx context.Context, domain string) (userID, agentID, messageID string) {
62 t.Helper()

Calls 7

SetPublisherMethod · 0.95
TestDBFunction · 0.92
NewStoreFunction · 0.92
NewSMTPRelayFunction · 0.92
NewSenderFunction · 0.92
NewAPIFunction · 0.92
NewNoopUsageTrackerFunction · 0.92

Tested by

no test coverage detected