1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 20:00:54 +00:00

fix the file rotate test case issues

This commit is contained in:
astaxie 2015-09-04 22:33:03 +08:00
parent 9ab7466d5c
commit f9fe89fff0

View File

@ -103,7 +103,7 @@ func TestFileRotate(t *testing.T) {
log.Critical("critical") log.Critical("critical")
log.Emergency("emergency") log.Emergency("emergency")
time.Sleep(time.Second * 4) time.Sleep(time.Second * 4)
rotatename := "test3.log" + fmt.Sprintf(".%s.%03d", time.Now().Format("2006-01-02"), 1) rotatename := "test3" + fmt.Sprintf(".%s.%03d", time.Now().Format("2006-01-02"), 1) + ".log"
b, err := exists(rotatename) b, err := exists(rotatename)
if !b || err != nil { if !b || err != nil {
t.Fatal("rotate not generated") t.Fatal("rotate not generated")