Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(sdk): split up engineCommands tests #7829

Merged
merged 3 commits into from
Jun 24, 2021

Conversation

williamluke4
Copy link
Contributor

No description provided.

@Jolg42 Jolg42 added this to the 2.26.0 milestone Jun 23, 2021
@Jolg42
Copy link
Member

Jolg42 commented Jun 23, 2021

Follows #7796

@Jolg42
Copy link
Member

Jolg42 commented Jun 23, 2021

@williamluke4 Looks like it's failing since the other PR was merged?

Comment on lines +22 to +48
test('sqlite and createMany', async () => {
expect.assertions(1)
try {
await getConfig({
datamodel: `
datasource db {
provider = "sqlite"
url = "file:../hello.db"
}

generator client {
provider = "prisma-client-js"
previewFeatures = ["createMany"]
}

model A {
id Int @id
name String
}`,
})
} catch (e) {
expect(stripAnsi(e.message)).toMatchInlineSnapshot(`
"Get config: Database provider \\"sqlite\\" and the preview feature \\"createMany\\" can't be used at the same time.
Please either remove the \\"createMany\\" feature flag or use any other database type that Prisma supports: postgres, mysql or sqlserver."
`)
}
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related for info:

createMany is GA since 2.20.0 and doesn't need a preview flag anymore.

We probably can remove this error?

// TODO This has been outdated for ages and needs to be handled differently and/or removed
if (
data.datasources?.[0]?.provider?.[0] === 'sqlite' &&
data.generators.some((g) => g.previewFeatures.includes('createMany'))
) {
const message = `Database provider "sqlite" and the preview feature "createMany" can't be used at the same time.
Please either remove the "createMany" feature flag or use any other database type that Prisma supports: postgres, mysql or sqlserver.`
throw new GetConfigError(message)
}

Copy link
Member

@Jolg42 Jolg42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @williamluke4! 👍

@williamluke4 williamluke4 merged commit 1d768cb into master Jun 24, 2021
@williamluke4 williamluke4 deleted the test/split/engineCommands branch June 24, 2021 09:35
Andrew-Colman pushed a commit to Andrew-Colman/prisma that referenced this pull request Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants