-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(analyzer): Update endtoend tests for new analyzer
Add a `contexts` key to exec.json to opt certain tests into or out of database-backed analysis. Fix many incorrect test cases that didn't run against an actual database.
- Loading branch information
1 parent
cba2aac
commit 48f638b
Showing
420 changed files
with
3,542 additions
and
786 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
CREATE TABLE bar (id serial not null); | ||
|
||
CREATE TABLE bar (id serial not null); |
3 changes: 3 additions & 0 deletions
3
internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/exec.json
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,3 @@ | ||
{ | ||
"contexts": ["managed-db"] | ||
} |
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...unc_return/postgresql/pgx/v5/go/models.go → ...esce_as/postgresql/pganalyze/go/models.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/query.sql.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/query.sql
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,4 @@ | ||
-- name: SumBaz :many | ||
SELECT bar, coalesce(sum(baz), 0) as quantity | ||
FROM foo | ||
GROUP BY 1; |
5 changes: 5 additions & 0 deletions
5
internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/schema.sql
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 @@ | ||
CREATE TABLE foo ( | ||
bar text, | ||
baz bigint | ||
); | ||
|
19 changes: 19 additions & 0 deletions
19
internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/sqlc.json
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,19 @@ | ||
{ | ||
"version": "1", | ||
"cloud": { | ||
"project": "01HAQMMECEYQYKFJN8MP16QC41" | ||
}, | ||
"packages": [ | ||
{ | ||
"path": "go", | ||
"engine": "postgresql", | ||
"sql_package": "pgx/v5", | ||
"database": { | ||
"managed": true | ||
}, | ||
"name": "querytest", | ||
"schema": "schema.sql", | ||
"queries": "query.sql" | ||
} | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/exec.json
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,3 @@ | ||
{ | ||
"contexts": ["base"] | ||
} |
3 changes: 3 additions & 0 deletions
3
internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/exec.json
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,3 @@ | ||
{ | ||
"contexts": ["base"] | ||
} |
3 changes: 3 additions & 0 deletions
3
internal/endtoend/testdata/coalesce_as/postgresql/stdlib/exec.json
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,3 @@ | ||
{ | ||
"contexts": ["base"] | ||
} |
Oops, something went wrong.