satellite/admin: fix test failing at the end of month

Change-Id: I6db6080614eaa0d775c730a7eec571b02da03e7f
This commit is contained in:
Michal Niewrzal 2020-07-29 14:17:11 +02:00
parent dc971751ad
commit 14f49558ac

View File

@ -349,7 +349,9 @@ func TestDeleteProjectWithUsagePreviousMonth(t *testing.T) {
require.NoError(t, err)
//ToDo: Improve updating of DB entries
accTime := time.Now().UTC().AddDate(0, -1, 0)
now := time.Now().UTC()
// set fixed day to avoid failures at the end of the month
accTime := time.Date(now.Year(), now.Month()-1, 15, now.Hour(), now.Minute(), now.Second(), now.Nanosecond(), time.UTC)
tally := accounting.BucketStorageTally{
BucketName: "test",
ProjectID: projectID,