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

Function newStoreAndUser

internal/idempotency/store_test.go:16–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14)
15
16func newStoreAndUser(t *testing.T) (*idempotency.Store, string, *pgxpool.Pool) {
17 t.Helper()
18 pool := testutil.TestDB(t)
19 identStore := identity.NewStore(pool)
20 u, err := identStore.CreateOrGetUser(context.Background(), "idem-"+t.Name()+"@example.com", "Idem", "google-idem-"+t.Name())
21 if err != nil {
22 t.Fatalf("CreateOrGetUser: %v", err)
23 }
24 return idempotency.NewStore(pool), u.ID, pool
25}
26
27func TestClaim_FreshAcquires(t *testing.T) {
28 store, userID, _ := newStoreAndUser(t)

Calls 5

CreateOrGetUserMethod · 0.95
TestDBFunction · 0.92
NewStoreFunction · 0.92
NewStoreFunction · 0.92
NameMethod · 0.65

Tested by

no test coverage detected