-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add tests for schema and check helper methods (#289)
Also fix a minor issue with how `TestCase` parses thread names to create a description
- Loading branch information
1 parent
d1cc47a
commit 93c5bb6
Showing
19 changed files
with
246 additions
and
4 deletions.
There are no files selected for viewing
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
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
5 changes: 5 additions & 0 deletions
5
src/migration/snapshots/roadster__migration__check__tests__str_len_gt@str_len_gt.snap
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 @@ | ||
--- | ||
source: src/migration/check.rs | ||
expression: table_stmt.to_string(PostgresQueryBuilder) | ||
--- | ||
CREATE TABLE "foo" ( "bar" varchar NOT NULL CHECK (CHAR_LENGTH("bar") > 1) ) |
5 changes: 5 additions & 0 deletions
5
src/migration/snapshots/roadster__migration__check__tests__str_len_gte@str_len_gte.snap
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 @@ | ||
--- | ||
source: src/migration/check.rs | ||
expression: table_stmt.to_string(PostgresQueryBuilder) | ||
--- | ||
CREATE TABLE "foo" ( "bar" varchar NOT NULL CHECK (CHAR_LENGTH("bar") >= 1) ) |
5 changes: 5 additions & 0 deletions
5
src/migration/snapshots/roadster__migration__check__tests__str_not_empty@str_not_empty.snap
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 @@ | ||
--- | ||
source: src/migration/check.rs | ||
expression: table_stmt.to_string(PostgresQueryBuilder) | ||
--- | ||
CREATE TABLE "foo" ( "bar" varchar NOT NULL CHECK (CHAR_LENGTH("bar") > 0) ) |
5 changes: 5 additions & 0 deletions
5
...igration/snapshots/roadster__migration__schema__tests__pk_bigint_auto@pk_bigint_auto.snap
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 @@ | ||
--- | ||
source: src/migration/schema.rs | ||
expression: table_stmt.to_string(PostgresQueryBuilder) | ||
--- | ||
CREATE TABLE "foo" ( "bar" bigserial NOT NULL PRIMARY KEY ) |
5 changes: 5 additions & 0 deletions
5
src/migration/snapshots/roadster__migration__schema__tests__pk_uuid@pk_uuid.snap
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 @@ | ||
--- | ||
source: src/migration/schema.rs | ||
expression: table_stmt.to_string(PostgresQueryBuilder) | ||
--- | ||
CREATE TABLE "foo" ( "bar" uuid PRIMARY KEY ) |
5 changes: 5 additions & 0 deletions
5
...ration/snapshots/roadster__migration__schema__tests__pk_uuid_default@pk_uuid_default.snap
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 @@ | ||
--- | ||
source: src/migration/schema.rs | ||
expression: table_stmt.to_string(PostgresQueryBuilder) | ||
--- | ||
CREATE TABLE "foo" ( "bar" uuid PRIMARY KEY DEFAULT custom_uuid_fn() ) |
5 changes: 5 additions & 0 deletions
5
src/migration/snapshots/roadster__migration__schema__tests__pk_uuidv4@pk_uuidv4.snap
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 @@ | ||
--- | ||
source: src/migration/schema.rs | ||
expression: table_stmt.to_string(PostgresQueryBuilder) | ||
--- | ||
CREATE TABLE "foo" ( "bar" uuid PRIMARY KEY DEFAULT uuid_generate_v4() ) |
5 changes: 5 additions & 0 deletions
5
src/migration/snapshots/roadster__migration__schema__tests__pk_uuidv7@pk_uuidv7.snap
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 @@ | ||
--- | ||
source: src/migration/schema.rs | ||
expression: table_stmt.to_string(PostgresQueryBuilder) | ||
--- | ||
CREATE TABLE "foo" ( "bar" uuid PRIMARY KEY DEFAULT uuid_generate_v7() ) |
5 changes: 5 additions & 0 deletions
5
src/migration/snapshots/roadster__migration__schema__tests__table.snap
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 @@ | ||
--- | ||
source: src/migration/schema.rs | ||
expression: statement.to_string(PostgresQueryBuilder) | ||
--- | ||
CREATE TABLE IF NOT EXISTS "foo" ( "created_at" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP ) |
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 @@ | ||
--- | ||
source: src/migration/schema.rs | ||
expression: table_stmt.to_string(PostgresQueryBuilder) | ||
--- | ||
CREATE TABLE "foo" ( "created_at" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP ) |
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
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
5 changes: 5 additions & 0 deletions
5
...ng/snapshots/roadster__testing__snapshot__tests__description_from_thread_name@case_1.snap
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 @@ | ||
--- | ||
source: src/testing/snapshot.rs | ||
expression: description | ||
--- | ||
|
5 changes: 5 additions & 0 deletions
5
...ng/snapshots/roadster__testing__snapshot__tests__description_from_thread_name@case_2.snap
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 @@ | ||
--- | ||
source: src/testing/snapshot.rs | ||
expression: description | ||
--- | ||
foo |
5 changes: 5 additions & 0 deletions
5
...ng/snapshots/roadster__testing__snapshot__tests__description_from_thread_name@case_3.snap
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 @@ | ||
--- | ||
source: src/testing/snapshot.rs | ||
expression: description | ||
--- | ||
bar |
5 changes: 5 additions & 0 deletions
5
...ng/snapshots/roadster__testing__snapshot__tests__description_from_thread_name@case_4.snap
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 @@ | ||
--- | ||
source: src/testing/snapshot.rs | ||
expression: description | ||
--- | ||
x_y_z_1_2_3 |
5 changes: 5 additions & 0 deletions
5
...ng/snapshots/roadster__testing__snapshot__tests__description_from_thread_name@case_5.snap
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 @@ | ||
--- | ||
source: src/testing/snapshot.rs | ||
expression: description | ||
--- | ||
x_y_z_1_2_3 |