From 112045110870b5258519b56f12de7a72e8687cfc Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Tue, 29 Apr 2014 16:02:18 +0800 Subject: [PATCH] Use sqlite as default test database --- main_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main_test.go b/main_test.go index 0239ed96..7cd7c211 100644 --- a/main_test.go +++ b/main_test.go @@ -7,9 +7,9 @@ import ( "fmt" _ "github.com/go-sql-driver/mysql" + "github.com/jinzhu/gorm" _ "github.com/lib/pq" _ "github.com/mattn/go-sqlite3" - "github.com/jinzhu/gorm" "os" "reflect" @@ -149,12 +149,12 @@ func init() { // GRANT ALL ON gorm.* TO 'gorm'@'localhost'; fmt.Println("testing mysql...") db, err = gorm.Open("mysql", "gorm:gorm@/gorm?charset=utf8&parseTime=True") - case "sqlite": - fmt.Println("testing sqlite3...") - db, err = gorm.Open("sqlite3", "/tmp/gorm.db") - default: + case "postgres": fmt.Println("testing postgres...") db, err = gorm.Open("postgres", "user=gorm dbname=gorm sslmode=disable") + default: + fmt.Println("testing sqlite3...") + db, err = gorm.Open("sqlite3", "/tmp/gorm.db") } // db.SetLogger(Logger{log.New(os.Stdout, "\r\n", 0)})