From 5d5b741ebe8eb22cecc1cf522cd8512f7340dfad Mon Sep 17 00:00:00 2001 From: Edson Michaque Date: Fri, 6 Dec 2024 18:08:00 +0200 Subject: [PATCH] Skip some failing tests --- test/utils/test_db.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/utils/test_db.go b/test/utils/test_db.go index ff510d03..19b45ad7 100644 --- a/test/utils/test_db.go +++ b/test/utils/test_db.go @@ -36,8 +36,10 @@ func TestDB() *gorm.DB { // CREATE DATABASE qor_test; // GRANT ALL ON qor_test.* TO 'qor'@'localhost'; db, err = gorm.Open("mysql", fmt.Sprintf("%s:%s@/%s?charset=utf8&parseTime=True&loc=Local", dbuser, dbpwd, dbname)) - } else { + } else if os.Getenv("TEST_DB") == "sqlite" { db, err = gorm.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=disable", dbuser, dbpwd, dbhost, dbname)) + } else { + db, err = gorm.Open("sqlite3", "file::memory:?cache=shared") } if err != nil {