mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 17:41:57 +08:00
Fix: uint may overflow / Test: get user storage
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/HFO4/cloudreve/pkg/conf"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
@@ -8,10 +9,12 @@ import (
|
||||
|
||||
func TestMigration(t *testing.T) {
|
||||
asserts := assert.New(t)
|
||||
conf.DatabaseConfig.Type = "sqlite3"
|
||||
DB, _ = gorm.Open("sqlite3", ":memory:")
|
||||
|
||||
asserts.NotPanics(func() {
|
||||
migration()
|
||||
})
|
||||
conf.DatabaseConfig.Type = "mysql"
|
||||
DB = mockDB
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user