prisma / prisma-test-utils

A collection of data model agnostic test utils.
114 stars 11 forks source link

PostgreSQL type errors #23

Open janpio opened 4 years ago

janpio commented 4 years ago

When using prisma-test-utils via prisma-test-utils-automation, some databases (schemas from: https://github.com/prisma/database-schema-examples) fail with this error message:

Error in: aragon-notification-service
PrismaClientUnknownRequestError:
Invalid `: new eventsourcesClient()` invocation in
C:\Users\Jan\Documents\prisma-test-utils-automation\dbs\aragon-notification-service\node_modules\prisma-client\index.js:541:7

   537   args || {},
   538   [],
   539   errorFormat,
   540   measurePerformance
→  541 ) : new eventsourcesClient

Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: ToSql(0), cause: Some(WrongType { postgres: Type(Jsonb), rust: "alloc::borrow::Cow<str>" }) }) })
    at PrismaClientFetcher.request (C:\Users\Jan\Documents\prisma-test-utils-automation\dbs\aragon-notification-service\node_modules\prisma-client\index.js:90:17)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error in: basic-twitter
PrismaClientUnknownRequestError:
Invalid `: new locationsClient()` invocation in
C:\Users\Jan\Documents\prisma-test-utils-automation\dbs\basic-twitter\node_modules\prisma-client\index.js:497:7

  493   args || {},
  494   [],
  495   errorFormat,
  496   measurePerformance
→ 497 ) : new locationsClient

Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: ToSql(0), cause: Some(WrongType { postgres: Type(Uuid), rust: "alloc::borrow::Cow<str>" }) }) })
    at PrismaClientFetcher.request (C:\Users\Jan\Documents\prisma-test-utils-automation\dbs\basic-twitter\node_modules\prisma-client\index.js:90:17)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error in: niko-public-1
PrismaClientUnknownRequestError:
Invalid `: new postsClient()` invocation in
C:\Users\Jan\Documents\prisma-test-utils-automation\dbs\niko-public-1\node_modules\prisma-client\index.js:776:7

   772   args || {},
   773   [],
   774   errorFormat,
   775   measurePerformance
→  776 ) : new postsClient

Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: ToSql(1), cause: Some(WrongType { postgres: Type(Timestamptz), rust: "chrono::naive::datetime::NaiveDateTime" }) }) })
    at PrismaClientFetcher.request (C:\Users\Jan\Documents\prisma-test-utils-automation\dbs\niko-public-1\node_modules\prisma-client\index.js:90:17)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)