lunny/fix_drone (#52)
This commit is contained in:
parent
7d1d621d68
commit
817c743b93
|
@ -26,8 +26,7 @@ pipeline:
|
||||||
- go get -u github.com/go-xorm/sqlfiddle
|
- go get -u github.com/go-xorm/sqlfiddle
|
||||||
- go get -u github.com/go-sql-driver/mysql
|
- go get -u github.com/go-sql-driver/mysql
|
||||||
- go get -u github.com/mattn/go-sqlite3
|
- go get -u github.com/mattn/go-sqlite3
|
||||||
#- golint ./...
|
- go test -v -race -coverprofile=coverage.txt -covermode=atomic -dbConn="root:@tcp(mysql:3306)/core_test?charset=utf8mb4"
|
||||||
- go test -v -race -coverprofile=coverage.txt -covermode=atomic
|
|
||||||
when:
|
when:
|
||||||
event: [ push, tag, pull_request ]
|
event: [ push, tag, pull_request ]
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ import (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
dbtype = flag.String("dbtype", "mysql", "database type")
|
dbtype = flag.String("dbtype", "mysql", "database type")
|
||||||
|
dbConn = flag.String("dbConn", "root:@/core_test?charset=utf8", "database connect string")
|
||||||
createTableSql string
|
createTableSql string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -50,7 +51,7 @@ func testOpen() (*DB, error) {
|
||||||
os.Remove("./test.db")
|
os.Remove("./test.db")
|
||||||
return Open("sqlite3", "./test.db")
|
return Open("sqlite3", "./test.db")
|
||||||
case "mysql":
|
case "mysql":
|
||||||
return Open("mysql", "root:@/core_test?charset=utf8")
|
return Open("mysql", *dbConn)
|
||||||
default:
|
default:
|
||||||
panic("no db type")
|
panic("no db type")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue