mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:10:54 +00:00
fix the file rotate test case issues
This commit is contained in:
parent
9ab7466d5c
commit
f9fe89fff0
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user