mirror of https://github.com/go-gorm/gorm.git
Update test script
This commit is contained in:
parent
4a01d4c263
commit
8ce2dd5548
|
@ -7,6 +7,10 @@ import (
|
|||
)
|
||||
|
||||
func TestExceptionsWithInvalidSql(t *testing.T) {
|
||||
if name := DB.Dialector.Name(); name == "sqlserver" {
|
||||
t.Skip("skip sqlserver due to it will raise data race for invalid sql")
|
||||
}
|
||||
|
||||
var columns []string
|
||||
if DB.Where("sdsd.zaaa = ?", "sd;;;aa").Pluck("aaa", &columns).Error == nil {
|
||||
t.Errorf("Should got error with invalid SQL")
|
||||
|
|
|
@ -19,27 +19,21 @@ for dialect in "${dialects[@]}" ; do
|
|||
then
|
||||
echo "testing ${dialect}..."
|
||||
|
||||
race=""
|
||||
if [ "$GORM_DIALECT" = "sqlserver" ]
|
||||
then
|
||||
race="-race"
|
||||
fi
|
||||
|
||||
if [ "$GORM_VERBOSE" = "" ]
|
||||
then
|
||||
GORM_DIALECT=${dialect} go test $race -count=1 ./...
|
||||
GORM_DIALECT=${dialect} go test -race -count=1 ./...
|
||||
if [ -d tests ]
|
||||
then
|
||||
cd tests
|
||||
GORM_DIALECT=${dialect} go test $race -count=1 ./...
|
||||
GORM_DIALECT=${dialect} go test -race -count=1 ./...
|
||||
cd ..
|
||||
fi
|
||||
else
|
||||
GORM_DIALECT=${dialect} go test $race -count=1 -v ./...
|
||||
GORM_DIALECT=${dialect} go test -race -count=1 -v ./...
|
||||
if [ -d tests ]
|
||||
then
|
||||
cd tests
|
||||
GORM_DIALECT=${dialect} go test $race -count=1 -v ./...
|
||||
GORM_DIALECT=${dialect} go test -race -count=1 -v ./...
|
||||
cd ..
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue