diff options
author | shxsun <shxsun@gmail.com> | 2014-03-24 21:16:00 +0800 |
---|---|---|
committer | shxsun <shxsun@gmail.com> | 2014-03-24 21:16:00 +0800 |
commit | 8376b0d53cae91af0e180c05b9cb92c3f3f30d58 (patch) | |
tree | 823128e44a52f5bf4bdecd24a5c4073bf9eeea8b /modules/avatar/avatar_test.go | |
parent | 59bbddb3183c27cbb5fb7918cefd9bb3a763a410 (diff) | |
download | gitea-8376b0d53cae91af0e180c05b9cb92c3f3f30d58.tar.gz gitea-8376b0d53cae91af0e180c05b9cb92c3f3f30d58.zip |
use modeles/log instead log
Diffstat (limited to 'modules/avatar/avatar_test.go')
-rw-r--r-- | modules/avatar/avatar_test.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/avatar/avatar_test.go b/modules/avatar/avatar_test.go index a337959c6f..4656d6f0f4 100644 --- a/modules/avatar/avatar_test.go +++ b/modules/avatar/avatar_test.go @@ -4,13 +4,14 @@ package avatar_test import ( - "log" + "errors" "os" "strconv" "testing" "time" "github.com/gogits/gogs/modules/avatar" + "github.com/gogits/gogs/modules/log" ) const TMPDIR = "test-avatar" @@ -28,7 +29,7 @@ func TestFetchMany(t *testing.T) { os.Mkdir(TMPDIR, 0755) defer os.RemoveAll(TMPDIR) - log.Println("start") + t.Log("start") var n = 5 ch := make(chan bool, n) for i := 0; i < n; i++ { @@ -36,14 +37,14 @@ func TestFetchMany(t *testing.T) { hash := avatar.HashEmail(strconv.Itoa(i) + "ssx205@gmail.com") a := avatar.New(hash, TMPDIR) a.Update() - log.Println("finish", hash) + t.Log("finish", hash) ch <- true }(i) } for i := 0; i < n; i++ { <-ch } - log.Println("end") + t.Log("end") } // cat @@ -54,3 +55,7 @@ func TestHttp(t *testing.T) { http.ListenAndServe(":8001", nil) } */ + +func TestLogTrace(t *testing.T) { + log.Trace("%v", errors.New("console log test")) +} |