Skip to content

Commit b408c61

Browse files
author
Sergey Tatarintsev
committed
Fix remaining tests
1 parent 4d1ba57 commit b408c61

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

packages/client/tests/functional/fulltext-search/__snapshots__/tests.ts.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,6 @@ Invalid \`.findMany()\` invocation in
5050
XX testIf(process.platform !== 'win32' && clientMeta.runtime !== 'edge')('bad query', async () => {
5151
XX const result = prisma.user
5252
XX .findMany(
53-
syntax error in tsquery: "John Smith"
53+
Error occurred during query execution:
54+
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "42601", message: "syntax error in tsquery: \\"John Smith\\"", severity: "ERROR", detail: None, column: None, hint: None }), transient: false })
5455
`;

packages/client/tests/functional/interactive-transactions/__snapshots__/tests.ts.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,19 +225,19 @@ exports[`interactive-transactions (provider=postgresql, js_pg) batching raw roll
225225
Invalid \`prisma.$executeRaw()\` invocation:
226226
227227
228-
duplicate key value violates unique constraint "User_pkey"
228+
Raw query failed. Code: \`23505\`. Message: \`Key (id)=(1) already exists.\`
229229
`;
230230

231231
exports[`interactive-transactions (provider=postgresql, js_pg) batching rollback 1`] = `
232232
233233
Invalid \`prisma.user.create()\` invocation in
234234
/client/tests/functional/interactive-transactions/tests.ts:0:0
235235
236-
XX providerFlavor !== ProviderFlavors.JS_LIBSQL,
237-
XX )('batching rollback', async () => {
238-
XX const result = prisma.$transaction([
239-
XX prisma.user.create(
240-
duplicate key value violates unique constraint "User_email_key"
236+
XX email: '[email protected]',
237+
XX },
238+
XX }),
239+
→ XX prisma.user.create(
240+
Unique constraint failed on the fields: (\`email\`)
241241
`;
242242

243243
exports[`interactive-transactions (provider=postgresql, js_pg) batching rollback within callback 1`] = `
@@ -249,7 +249,7 @@ Invalid \`tx.user.create()\` invocation in
249249
XX ])
250250
XX
251251
→ XX await tx.user.create(
252-
duplicate key value violates unique constraint "User_email_key"
252+
Unique constraint failed on the fields: (\`email\`)
253253
`;
254254

255255
exports[`interactive-transactions (provider=postgresql, js_pg) rollback query 1`] = `
@@ -261,7 +261,7 @@ Invalid \`prisma.user.create()\` invocation in
261261
XX })
262262
XX
263263
→ XX await prisma.user.create(
264-
duplicate key value violates unique constraint "User_email_key"
264+
Unique constraint failed on the fields: (\`email\`)
265265
`;
266266

267267
exports[`interactive-transactions (provider=sqlite) batching raw rollback 1`] = `

packages/client/tests/functional/issues/11740-transaction-stored-query/__snapshots__/tests.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Invalid \`prisma.resource.create()\` invocation in
133133
XX providerFlavor !== ProviderFlavors.JS_PLANETSCALE,
134134
XX )('stored query trigger .requestTransaction twice should fail', async () => {
135135
XX const query = prisma.resource.create(
136-
duplicate key value violates unique constraint "Resource_email_key"
136+
Unique constraint failed on the fields: (\`email\`)
137137
`;
138138
139139
exports[`issues.11740-transaction-stored-query (provider=postgresql, js_pg) stored query triggered twice should fail but not exit process 1`] = `
@@ -145,7 +145,7 @@ Invalid \`prisma.resource.create()\` invocation in
145145
XX providerFlavor !== ProviderFlavors.JS_PLANETSCALE,
146146
XX )('stored query triggered twice should fail but not exit process', async () => {
147147
XX const query = prisma.resource.create(
148-
duplicate key value violates unique constraint "Resource_email_key"
148+
Unique constraint failed on the fields: (\`email\`)
149149
`;
150150
151151
exports[`issues.11740-transaction-stored-query (provider=sqlite) stored query trigger .requestTransaction twice should fail 1`] = `

packages/client/tests/functional/referentialActions-setDefault/tests_1-to-1.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ testMatrix.setupTestSuite(
158158
[ProviderFlavors.JS_NEON]:
159159
'Foreign key constraint failed on the field: `ProfileOneToOne_userId_fkey (index)`',
160160
[ProviderFlavors.JS_PG]:
161-
'insert or update on table "ProfileOneToOne" violates foreign key constraint "ProfileOneToOne_userId_fkey"',
161+
'Foreign key constraint failed on the field: `ProfileOneToOne_userId_fkey (index)`',
162162
[ProviderFlavors.JS_LIBSQL]: ': FOREIGN KEY constraint failed',
163163
},
164164
}),
@@ -238,7 +238,7 @@ testMatrix.setupTestSuite(
238238
[ProviderFlavors.JS_NEON]:
239239
'Foreign key constraint failed on the field: `ProfileOneToOne_userId_fkey (index)`',
240240
[ProviderFlavors.JS_PG]:
241-
'insert or update on table "ProfileOneToOne" violates foreign key constraint "ProfileOneToOne_userId_fkey"',
241+
'Foreign key constraint failed on the field: `ProfileOneToOne_userId_fkey (index)`',
242242
[ProviderFlavors.JS_LIBSQL]: ': FOREIGN KEY constraint failed',
243243
},
244244
}),

packages/client/tests/functional/referentialActions-setDefault/tests_1-to-n.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ testMatrix.setupTestSuite(
160160
[ProviderFlavors.JS_NEON]:
161161
'Foreign key constraint failed on the field: `PostOneToMany_userId_fkey (index)`',
162162
[ProviderFlavors.JS_PG]:
163-
'insert or update on table "PostOneToMany" violates foreign key constraint "PostOneToMany_userId_fkey"',
163+
'Foreign key constraint failed on the field: `PostOneToMany_userId_fkey (index)`',
164164
[ProviderFlavors.JS_LIBSQL]: ': FOREIGN KEY constraint failed',
165165
},
166166
}),
@@ -240,7 +240,7 @@ testMatrix.setupTestSuite(
240240
[ProviderFlavors.JS_NEON]:
241241
'Foreign key constraint failed on the field: `PostOneToMany_userId_fkey (index)`',
242242
[ProviderFlavors.JS_PG]:
243-
'insert or update on table "PostOneToMany" violates foreign key constraint "PostOneToMany_userId_fkey"',
243+
'Foreign key constraint failed on the field: `PostOneToMany_userId_fkey (index)`',
244244
[ProviderFlavors.JS_LIBSQL]: ': FOREIGN KEY constraint failed',
245245
},
246246
}),

0 commit comments

Comments
 (0)