(t *testing.T)
| 14 | ) |
| 15 | |
| 16 | func 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 | |
| 27 | func TestClaim_FreshAcquires(t *testing.T) { |
| 28 | store, userID, _ := newStoreAndUser(t) |
no test coverage detected