Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(cli): empty-schema -> incomplete-schemas (#15059)
* test(cli): empty-schema -> incomplete-schemas * test(cli): grouped incomplete-schemas test cases * chore: add fixtures for incomplete-schemas tests * chore: normalized format test in incomplete-schemas * Chore: extracted repeated error messages * test(cli): add datasource-block-url-env-set-invalid tests to incomplete-schemas suite
- Loading branch information
Showing
8 changed files
with
462 additions
and
135 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Empty file.
5 changes: 5 additions & 0 deletions
5
...li/src/__tests__/fixtures/incomplete-schemas/datasource-block-no-url/prisma/schema.prisma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// the schema has a `datasource db` block with no url field | ||
|
||
datasource db { | ||
provider = "postgresql" | ||
} |
1 change: 1 addition & 0 deletions
1
...rc/__tests__/fixtures/incomplete-schemas/datasource-block-url-env-set-invalid/prisma/.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SOME_DEFINED_INVALID_URL="some-invalid-url" |
6 changes: 6 additions & 0 deletions
6
...s__/fixtures/incomplete-schemas/datasource-block-url-env-set-invalid/prisma/schema.prisma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// the schema has a `datasource db` block with a defined - but invalid - env url | ||
|
||
datasource db { | ||
provider = "postgresql" | ||
url = env("SOME_DEFINED_INVALID_URL") | ||
} |
6 changes: 6 additions & 0 deletions
6
...__tests__/fixtures/incomplete-schemas/datasource-block-url-env-unset/prisma/schema.prisma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// the schema has a `datasource db` block with an undefined env url | ||
|
||
datasource db { | ||
provider = "postgresql" | ||
url = env("SOME_UNDEFINED_DB") | ||
} |
1 change: 1 addition & 0 deletions
1
packages/cli/src/__tests__/fixtures/incomplete-schemas/empty-schema/prisma/schema.prisma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// the schema is completely empty, no models, no blocks |
Oops, something went wrong.