Test: migration modifications

This commit is contained in:
HFO4
2020-02-22 12:25:23 +08:00
parent a8272a66b7
commit 8d9dee6e3d
4 changed files with 5 additions and 30 deletions

View File

@@ -1,6 +1,7 @@
package conf
import (
"github.com/HFO4/cloudreve/pkg/util"
"github.com/stretchr/testify/assert"
"io/ioutil"
"os"
@@ -12,10 +13,12 @@ func TestInitPanic(t *testing.T) {
asserts := assert.New(t)
// 日志路径不存在时
asserts.Panics(func() {
asserts.NotPanics(func() {
Init("not/exist/path")
})
asserts.True(util.Exists("conf.ini"))
}
// TestInitDelimiterNotFound 日志路径存在但 Key 格式错误时