diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-11-10 00:32:16 +0100 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-11-10 00:32:16 +0100 |
| commit | f082ae9a138edd1ee1bcdfc40276013064fbec7e (patch) | |
| tree | c18e5e63f283912f0989e9e82701ca28ff52c332 /testing/pgruntime/migration_test.go | |
| parent | 833e477420513a46faa4ebcc1164c50a8288a9ab (diff) | |
| download | go-gg-f082ae9a138edd1ee1bcdfc40276013064fbec7e.tar.gz | |
replace execQuery() with new gsql.Exec() helper
Diffstat (limited to 'testing/pgruntime/migration_test.go')
| -rw-r--r-- | testing/pgruntime/migration_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/testing/pgruntime/migration_test.go b/testing/pgruntime/migration_test.go index 6113c36..d65741a 100644 --- a/testing/pgruntime/migration_test.go +++ b/testing/pgruntime/migration_test.go @@ -7,6 +7,7 @@ import ( "testing" "go.xyrillian.de/gg/assert" + "go.xyrillian.de/gg/gsql" "go.xyrillian.de/gg/oblast" "go.xyrillian.de/gg/pgruntime" ) @@ -17,7 +18,7 @@ func TestMigrations(t *testing.T) { // reset the test DB to empty if it exists db, _ := connector.ConnectForTest(t, defaultBehavior) for _, tableName := range []string{"comments", "posts", "schema_migrations"} { - _, err := execQuery(ctx, db, `DROP TABLE IF EXISTS `+tableName, nil) + _, err := gsql.Exec(ctx, db, `DROP TABLE IF EXISTS `+tableName) if err != nil { t.Fatal(err.Error()) } @@ -50,7 +51,7 @@ func TestMigrations(t *testing.T) { if err != nil { t.Fatal(err.Error()) } - _, err = execQuery(ctx, db, `INSERT INTO comments (post_id, message) VALUES ($1, $2)`, []any{postID, "Hi there."}) + _, err = gsql.Exec(ctx, db, `INSERT INTO comments (post_id, message) VALUES ($1, $2)`, postID, "Hi there.") if err != nil { t.Fatal(err.Error()) } |
