Tests folder structure reorganisation.

This commit is contained in:
go-jet 2019-07-30 11:45:10 +02:00
parent d0533f73fb
commit 6bf9c32c07
19 changed files with 22 additions and 24 deletions

View file

@ -95,7 +95,7 @@ FROM test_sample.all_types;
testutils.JsonPrint(dest)
testutils.AssertJSONFile(t, "./testdata/common_db_results/bool_operators.json", dest)
testutils.AssertJSONFile(t, "./testdata/common/bool_operators.json", dest)
}
var allTypesJson = `

View file

@ -1,4 +1,4 @@
package tests
package postgres
import (
. "github.com/go-jet/jet"
@ -240,9 +240,7 @@ LIMIT $5;
assert.NilError(t, err)
testutils.JsonPrint(dest)
testutils.AssertJSONFile(t, "./testdata/common_db_results/bool_operators.json", dest)
testutils.AssertJSONFile(t, "./testdata/common/bool_operators.json", dest)
}
func TestFloatOperators(t *testing.T) {

View file

@ -1,4 +1,4 @@
package tests
package postgres
import (
"context"
@ -102,7 +102,7 @@ func TestJoinEverything(t *testing.T) {
assert.NilError(t, err)
assert.Equal(t, len(dest), 275)
testutils.AssertJSONFile(t, "./testdata/joined_everything.json", dest)
testutils.AssertJSONFile(t, "./postgres/testdata/joined_everything.json", dest)
}
func TestSelfJoin(t *testing.T) {

View file

@ -1,4 +1,4 @@
package tests
package postgres
import (
"context"

View file

@ -1,4 +1,4 @@
package tests
package postgres
import (
"context"

View file

@ -1,4 +1,4 @@
package tests
package postgres
import (
"context"

View file

@ -1,4 +1,4 @@
package tests
package postgres
import (
"bytes"

View file

@ -1,4 +1,4 @@
package tests
package postgres
import (
"github.com/go-jet/jet/internal/testutils"
@ -62,5 +62,5 @@ func TestNorthwindJoinEverything(t *testing.T) {
assert.NilError(t, err)
//jsonSave("./testdata/northwind-all.json", dest)
testutils.AssertJSONFile(t, "./testdata/northwind-all.json", dest)
testutils.AssertJSONFile(t, "./postgres/testdata/northwind-all.json", dest)
}

View file

@ -1,4 +1,4 @@
package tests
package postgres
import (
. "github.com/go-jet/jet"

View file

@ -1,4 +1,4 @@
package tests
package postgres
import (
. "github.com/go-jet/jet"
@ -182,7 +182,7 @@ func TestScanToStruct(t *testing.T) {
err := query.Query(db, &dest)
assert.Error(t, err, `Scan: unable to scan type int32 into UUID, at struct field: InventoryID uuid.UUID of type tests.Inventory. `)
assert.Error(t, err, `Scan: unable to scan type int32 into UUID, at struct field: InventoryID uuid.UUID of type postgres.Inventory. `)
})
}

View file

@ -1,4 +1,4 @@
package tests
package postgres
import (
. "github.com/go-jet/jet"
@ -1459,7 +1459,7 @@ ORDER BY actor.actor_id ASC, film.film_id ASC;
assert.NilError(t, err)
//jsonSave("./testdata/quick-start-dest.json", dest)
testutils.AssertJSONFile(t, "./testdata/quick-start-dest.json", dest)
testutils.AssertJSONFile(t, "./postgres/testdata/quick-start-dest.json", dest)
var dest2 []struct {
model.Category
@ -1472,7 +1472,7 @@ ORDER BY actor.actor_id ASC, film.film_id ASC;
assert.NilError(t, err)
//jsonSave("./testdata/quick-start-dest2.json", dest2)
testutils.AssertJSONFile(t, "./testdata/quick-start-dest2.json", dest2)
testutils.AssertJSONFile(t, "./postgres/testdata/quick-start-dest2.json", dest2)
}
func TestQuickStartWithSubQueries(t *testing.T) {
@ -1524,7 +1524,7 @@ func TestQuickStartWithSubQueries(t *testing.T) {
assert.NilError(t, err)
//jsonSave("./testdata/quick-start-dest.json", dest)
testutils.AssertJSONFile(t, "./testdata/quick-start-dest.json", dest)
testutils.AssertJSONFile(t, "./postgres/testdata/quick-start-dest.json", dest)
var dest2 []struct {
model.Category
@ -1537,5 +1537,5 @@ func TestQuickStartWithSubQueries(t *testing.T) {
assert.NilError(t, err)
//jsonSave("./testdata/quick-start-dest2.json", dest2)
testutils.AssertJSONFile(t, "./testdata/quick-start-dest2.json", dest2)
testutils.AssertJSONFile(t, "./postgres/testdata/quick-start-dest2.json", dest2)
}

View file

@ -1,4 +1,4 @@
package tests
package postgres
import (
"context"

View file

@ -1,4 +1,4 @@
package tests
package postgres
import (
"github.com/go-jet/jet"