(
testFn: (params: { userId: string }) => Promise<void>
)
| 19 | |
| 20 | const schemaTestDb = createDrizzleClient({ |
| 21 | connectionString: computeDatabaseUrl(), |
| 22 | poolConfig: { application_name: 'db-schema-test', max: 1 }, |
| 23 | }); |
| 24 | |
| 25 | afterAll(async () => { |
| 26 | await schemaTestDb.pool.end(); |
| 27 | }); |
| 28 | |
| 29 | describe('kilocode_users pepper default', () => { |
| 30 | it('gives a new account a pepper so a rotation revokes every token it can mint', async () => { |
| 31 | const pepperUserId = `oauth/schema-pepper-${crypto.randomUUID()}`; |
| 32 | try { |
| 33 | const [user] = await schemaTestDb.db |
| 34 | .insert(schema.kilocode_users) |
| 35 | .values({ |
| 36 | id: pepperUserId, |
| 37 | google_user_email: `${pepperUserId}@example.com`, |
| 38 | google_user_name: 'Schema pepper test', |
| 39 | google_user_image_url: '', |
| 40 | stripe_customer_id: `cus_${crypto.randomUUID()}`, |
| 41 | }) |
| 42 | .returning(); |
no test coverage detected