From f70d2cc373b1784c10b5533a3d156cc426b92d54 Mon Sep 17 00:00:00 2001 From: astaxie Date: Sun, 17 Jan 2016 18:24:29 +0800 Subject: [PATCH] add test case for tidb --- .travis.yml | 4 +++- orm/models_test.go | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c59cef61..a393e475 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,10 @@ services: - postgresql - memcached env: - - ORM_DRIVER=sqlite3 ORM_SOURCE=$TRAVIS_BUILD_DIR/orm_test.db + - ORM_DRIVER=sqlite3 ORM_SOURCE=$TRAVIS_BUILD_DIR/orm_test.db - ORM_DRIVER=mysql ORM_SOURCE="root:@/orm_test?charset=utf8" - ORM_DRIVER=postgres ORM_SOURCE="user=postgres dbname=orm_test sslmode=disable" + - ORM_DRIVER=tidb ORM_SOURCE="memory://test/test" install: - go get github.com/lib/pq - go get github.com/go-sql-driver/mysql @@ -24,6 +25,7 @@ install: - go get github.com/couchbase/go-couchbase - go get github.com/siddontang/ledisdb/config - go get github.com/siddontang/ledisdb/ledis + - go get github.com/pingcap/tidb before_script: - sh -c "if [ '$ORM_DRIVER' = 'postgres' ]; then psql -c 'create database orm_test;' -U postgres; fi" - sh -c "if [ '$ORM_DRIVER' = 'mysql' ]; then mysql -u root -e 'create database orm_test;'; fi" diff --git a/orm/models_test.go b/orm/models_test.go index ee56e8e8..c5397e11 100644 --- a/orm/models_test.go +++ b/orm/models_test.go @@ -25,9 +25,7 @@ import ( _ "github.com/go-sql-driver/mysql" _ "github.com/lib/pq" _ "github.com/mattn/go-sqlite3" - - // As tidb can't use go get, so disable the tidb testing now - // _ "github.com/pingcap/tidb" + _ "github.com/pingcap/tidb" ) // A slice string field.