diff options
author | Martin Polden <mpolden@mpolden.no> | 2021-09-17 13:32:44 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2021-09-17 13:33:57 +0200 |
commit | cccce75fed123137507e34d03d0a3e644892da69 (patch) | |
tree | defb0e7d14521b22f346f4e64d338824457b3a63 /client | |
parent | 54ca6a7a15187f1a59ed61a59e95dc1541308e0d (diff) |
Account for local time conversion in test
Diffstat (limited to 'client')
-rw-r--r-- | client/go/vespa/target_test.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/client/go/vespa/target_test.go b/client/go/vespa/target_test.go index f4875587593..b524f73c5d3 100644 --- a/client/go/vespa/target_test.go +++ b/client/go/vespa/target_test.go @@ -7,6 +7,7 @@ import ( "net/http" "net/http/httptest" "testing" + "time" "github.com/stretchr/testify/assert" ) @@ -128,7 +129,10 @@ func TestCloudTargetWait(t *testing.T) { assertServiceWait(t, 500, target, "query") assertServiceWait(t, 500, target, "document") - assert.Equal(t, "[14:08:28] info Deploying platform version 7.465.17 and application version 1.0.2 ...\n", logWriter.String()) + // Log timestamp is converted to local time, do the same here in case the local time where tests are run varies + tm := time.Unix(1631707708, 431000) + expectedTime := tm.Format("[15:04:05]") + assert.Equal(t, expectedTime+" info Deploying platform version 7.465.17 and application version 1.0.2 ...\n", logWriter.String()) } func assertServiceURL(t *testing.T, url string, target Target, service string) { |