Fix integration tests.
This commit is contained in:
parent
eccc17dc8a
commit
5c05214ba1
5 changed files with 102 additions and 18 deletions
|
|
@ -4,6 +4,8 @@ import (
|
|||
"database/sql"
|
||||
"fmt"
|
||||
_ "github.com/lib/pq"
|
||||
"github.com/sub0zero/go-sqlbuilder/generator"
|
||||
"gotest.tools/assert"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -75,3 +77,14 @@ CREATE TABLE IF NOT EXISTS test_sample.link (
|
|||
fmt.Println(result)
|
||||
|
||||
}
|
||||
|
||||
func TestGenerateModel(t *testing.T) {
|
||||
|
||||
err := generator.Generate(folderPath, connectString, dbname, schemaName)
|
||||
|
||||
assert.NilError(t, err)
|
||||
|
||||
//err = generator.Generate(folderPath, connectString, dbname, "sport")
|
||||
//
|
||||
//assert.NilError(t, err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package tests
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/sub0zero/go-sqlbuilder/generator"
|
||||
"github.com/sub0zero/go-sqlbuilder/sqlbuilder"
|
||||
"github.com/sub0zero/go-sqlbuilder/tests/.test_files/dvd_rental/dvds/model"
|
||||
. "github.com/sub0zero/go-sqlbuilder/tests/.test_files/dvd_rental/dvds/table"
|
||||
|
|
@ -12,17 +11,6 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
func TestGenerateModel(t *testing.T) {
|
||||
|
||||
err := generator.Generate(folderPath, connectString, dbname, schemaName)
|
||||
|
||||
assert.NilError(t, err)
|
||||
|
||||
//err = generator.Generate(folderPath, connectString, dbname, "sport")
|
||||
//
|
||||
//assert.NilError(t, err)
|
||||
}
|
||||
|
||||
func TestSelect_ScanToStruct(t *testing.T) {
|
||||
actor := model.Actor{}
|
||||
query := Actor.SELECT(Actor.AllColumns).ORDER_BY(Actor.ActorID.Asc())
|
||||
Loading…
Add table
Add a link
Reference in a new issue