From b4bc17f922ee3b72aaf19a1a75d99dfa5f7a15de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCrbach?= Date: Fri, 18 Feb 2022 22:47:26 +0100 Subject: [PATCH] fix(integration): no spans in the future MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Würbach --- plugin/storage/integration/integration_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/storage/integration/integration_test.go b/plugin/storage/integration/integration_test.go index ffdbb0e871c..3a860fb42ae 100644 --- a/plugin/storage/integration/integration_test.go +++ b/plugin/storage/integration/integration_test.go @@ -327,10 +327,10 @@ func loadAndParseJSON(t *testing.T, path string, object interface{}) { func correctTime(json []byte) []byte { jsonString := string(json) now := time.Now().UTC() - today := now.Format("2006-01-02") yesterday := now.AddDate(0, 0, -1).Format("2006-01-02") - retString := strings.Replace(jsonString, "2017-01-26", today, -1) - retString = strings.Replace(retString, "2017-01-25", yesterday, -1) + twoDaysAgo := now.AddDate(0, 0, -2).Format("2006-01-02") + retString := strings.Replace(jsonString, "2017-01-26", yesterday, -1) + retString = strings.Replace(retString, "2017-01-25", twoDaysAgo, -1) return []byte(retString) }