Update circle ci for MySQL tests.

This commit is contained in:
go-jet 2019-08-08 10:51:59 +02:00
parent fbf5fbddbc
commit 4c5584aaae
8 changed files with 77 additions and 53 deletions

View file

@ -1,7 +1,6 @@
package postgres
import (
"fmt"
"github.com/go-jet/jet/internal/testutils"
"github.com/go-jet/jet/postgres"
. "github.com/go-jet/jet/postgres"
@ -94,7 +93,7 @@ LIMIT $5;
assert.NilError(t, err)
//testutils.JsonPrint(dest)
//testutils.PrintJson(dest)
testutils.AssertJSON(t, dest, `
[
@ -233,11 +232,7 @@ func TestStringOperators(t *testing.T) {
TO_HEX(AllTypes.IntegerPtr),
)
//_, args, _ := query.Sql()
//fmt.Println(query.Sql())
//fmt.Println(args[15])
fmt.Println(query.Sql())
err := query.Query(db, &struct{}{})
@ -408,7 +403,7 @@ LIMIT $35;
assert.NilError(t, err)
//testutils.JsonPrint(dest)
//testutils.PrintJson(dest)
testutils.AssertJSONFile(t, dest, "./testdata/common/float_operators.json")
}
@ -485,7 +480,7 @@ func TestIntegerOperators(t *testing.T) {
CBRT(ABSi(AllTypes.BigInt)).AS("cbrt"),
).LIMIT(2)
fmt.Println(query.Sql())
//fmt.Println(query.Sql())
testutils.AssertStatementSql(t, query, `
SELECT all_types.big_int AS "all_types.big_int",
@ -547,8 +542,8 @@ LIMIT $22;
assert.NilError(t, err)
//testutils.JsonSave("./testdata/common/int_operators.json", dest)
//testutils.JsonPrint(dest)
//testutils.SaveJsonFile("./testdata/common/int_operators.json", dest)
//testutils.PrintJson(dest)
testutils.AssertJSONFile(t, dest, "./testdata/common/int_operators.json")
}

View file

@ -1051,11 +1051,11 @@ ORDER BY customer.customer_id, SUM(payment.amount) ASC;
assert.NilError(t, err)
//testutils.JsonPrint(dest)
//testutils.PrintJson(dest)
assert.Equal(t, len(dest), 104)
//testutils.JsonSave(dest, "postgres/testdata/customer_payment_sum.json")
//testutils.SaveJsonFile(dest, "postgres/testdata/customer_payment_sum.json")
testutils.AssertJSONFile(t, dest, "postgres/testdata/customer_payment_sum.json")
}