From 417d523d04598024528cb86e553dd2d8cb61afa8 Mon Sep 17 00:00:00 2001 From: matryer Date: Tue, 30 Mar 2021 11:41:51 +0100 Subject: [PATCH] fixed broken test where time was being parsed --- pkg/update/update_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/update/update_test.go b/pkg/update/update_test.go index 247229e3b..eece1697b 100644 --- a/pkg/update/update_test.go +++ b/pkg/update/update_test.go @@ -77,7 +77,8 @@ func TestUpdate(t *testing.T) { apiServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { version := "v2.0.0" response := Release{ - TagName: version, + CreatedAtString: time.Now().Format(time.RFC3339Nano), + TagName: version, Assets: []Asset{ { Name: "xbar-" + version + ".tar.gz", @@ -129,7 +130,8 @@ func TestMatchingVersions(t *testing.T) { apiServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { version := "v2.1.0" response := Release{ - TagName: version, + CreatedAtString: time.Now().Format(time.RFC3339Nano), + TagName: version, Assets: []Asset{ { Name: "xbar-" + version + ".tar.gz", @@ -176,7 +178,8 @@ func TestLocalVersionIsHigher(t *testing.T) { apiServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { version := "v2.1.0" response := Release{ - TagName: version, + CreatedAtString: time.Now().Format(time.RFC3339Nano), + TagName: version, Assets: []Asset{ { Name: "xbar-" + version + ".tar.gz",