Skip to content

Commit

Permalink
test(cli): empty-schema -> incomplete-schemas (#15059)
Browse files Browse the repository at this point in the history
* 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
jkomyno committed Sep 1, 2022
1 parent 29770bd commit 8110f2c
Show file tree
Hide file tree
Showing 8 changed files with 462 additions and 135 deletions.
135 changes: 0 additions & 135 deletions packages/cli/src/__tests__/empty-schema.test.ts

This file was deleted.

Empty file.
@@ -0,0 +1,5 @@
// the schema has a `datasource db` block with no url field

datasource db {
provider = "postgresql"
}
@@ -0,0 +1 @@
SOME_DEFINED_INVALID_URL="some-invalid-url"
@@ -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")
}
@@ -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")
}
@@ -0,0 +1 @@
// the schema is completely empty, no models, no blocks

0 comments on commit 8110f2c

Please sign in to comment.