From f9fe89fff0e6044468d27fb14febbc7ee38ae336 Mon Sep 17 00:00:00 2001 From: astaxie Date: Fri, 4 Sep 2015 22:33:03 +0800 Subject: [PATCH] fix the file rotate test case issues --- logs/file_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logs/file_test.go b/logs/file_test.go index c71e9bb4..97260f12 100644 --- a/logs/file_test.go +++ b/logs/file_test.go @@ -103,7 +103,7 @@ func TestFileRotate(t *testing.T) { log.Critical("critical") log.Emergency("emergency") 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) if !b || err != nil { t.Fatal("rotate not generated")