From 2565a8087cc1741fb170cf0e1eef6fe4696b9a85 Mon Sep 17 00:00:00 2001 From: Anton Sergeyev Date: Thu, 14 Jun 2018 13:00:07 +0500 Subject: [PATCH] #11607 corrected file cleanup test --- pkg/services/cleanup/cleanup_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/services/cleanup/cleanup_test.go b/pkg/services/cleanup/cleanup_test.go index 834fdc424fb..54d29e32bf1 100644 --- a/pkg/services/cleanup/cleanup_test.go +++ b/pkg/services/cleanup/cleanup_test.go @@ -16,7 +16,7 @@ func TestCleanUpTmpFiles(t *testing.T) { } now := time.Now() secondAgo := now.Add(-time.Second) - dayAgo := now.Add(-time.Second * 3600 * 24 * 7) + twoDaysAgo := now.Add(-time.Second * 3600 * 24 * 2) weekAgo := now.Add(-time.Second * 3600 * 24 * 7) Convey("Should not cleanup recent files", func() { @@ -24,7 +24,7 @@ func TestCleanUpTmpFiles(t *testing.T) { }) Convey("Should cleanup older files", func() { - So(service.shouldCleanupTempFile(dayAgo, now), ShouldBeTrue) + So(service.shouldCleanupTempFile(twoDaysAgo, now), ShouldBeTrue) }) Convey("After increasing temporary files lifetime, older files should be kept", func() {