From 76df498dd378d142a11bff83a672c80fa72f5143 Mon Sep 17 00:00:00 2001 From: Lawrence Jones Date: Tue, 5 Mar 2019 17:03:12 +0000 Subject: [PATCH] Parse our timestamp fixture in GMT This will then match our log lines, ensuring Gomega equality will pass. --- pkg/pgreplay/parse_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/pgreplay/parse_test.go b/pkg/pgreplay/parse_test.go index 2605152..2141dd3 100644 --- a/pkg/pgreplay/parse_test.go +++ b/pkg/pgreplay/parse_test.go @@ -9,7 +9,7 @@ import ( . "github.com/onsi/gomega" ) -var time20190225, _ = time.Parse(time.RFC3339, "2019-02-25T15:08:27.222+00:00") +var time20190225, _ = time.Parse(PostgresTimestampFormat, "2019-02-25 15:08:27.222 GMT") var _ = Describe("Parse", func() { DescribeTable("Parses", @@ -38,7 +38,7 @@ var _ = Describe("Parse", func() { Entry( "Extended protocol with duration logs", ` -2019-02-25 15:08:27.232 GMT|[unknown]|[unknown]|5c7404eb.d6bd|LOG: connection received: host=127.0.0.1 port=59103 +2019-02-25 15:08:27.222 GMT|[unknown]|[unknown]|5c7404eb.d6bd|LOG: connection received: host=127.0.0.1 port=59103 2019-02-25 15:08:27.222 GMT|alice|pgreplay_test|5c7404eb.d6bd|LOG: connection authorized: user=alice database=pgreplay_test 2019-02-25 15:08:27.222 GMT|alice|pgreplay_test|5c7404eb.d6bd|LOG: duration: 0.968 ms parse : select t.oid 2019-02-25 15:08:27.222 GMT|alice|pgreplay_test|5c7404eb.d6bd|LOG: duration: 1.100 ms bind : select t.oid