Skip to content
Snippets Groups Projects
Commit 7cda6631 authored by 高辛格's avatar 高辛格
Browse files

fix issue88

parent 1a31c2d2
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@
package logger
import (
"fmt"
"path/filepath"
"testing"
......@@ -41,7 +42,7 @@ func TestInitLog(t *testing.T) {
path, err = filepath.Abs("./logger.yml")
assert.NoError(t, err)
err = InitLog(path)
assert.EqualError(t, err, "ioutil.ReadFile(file:"+path+") = error:open "+path+": no such file or directory")
assert.Contains(t, err.Error(), fmt.Sprintf("ioutil.ReadFile(file:%s) = error:", path))
err = InitLog("./log.yml")
assert.NoError(t, err)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment