From fc258df5b504b90400565cf56cb59e022cba077f Mon Sep 17 00:00:00 2001 From: Bob Shannon Date: Tue, 10 Apr 2018 19:16:08 -0700 Subject: [PATCH] Fix deep equal comparison for time.Time Signed-off-by: Bob Shannon --- api/prometheus/v1/api_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/prometheus/v1/api_test.go b/api/prometheus/v1/api_test.go index 29a2910..5e66076 100644 --- a/api/prometheus/v1/api_test.go +++ b/api/prometheus/v1/api_test.go @@ -447,7 +447,7 @@ func TestAPIs(t *testing.T) { }, "scrapeUrl": testURL.String(), "lastError": "error while scraping target", - "lastScrape": testTime.Format(time.RFC3339Nano), + "lastScrape": testTime.UTC().Format(time.RFC3339Nano), "health": "up", }, }, @@ -477,7 +477,7 @@ func TestAPIs(t *testing.T) { }, ScrapeURL: testURL, LastError: "error while scraping target", - LastScrape: testTime.Round(0), + LastScrape: testTime.UTC(), Health: scrape.HealthGood, }, },