From 6f57a24991de759c9346522294b09c28d3e75398 Mon Sep 17 00:00:00 2001 From: Fabio Bonelli Date: Tue, 19 Mar 2024 19:50:34 +0100 Subject: [PATCH] test: fix GET /log test (#233) GET /logs test wasn't properly checking for createdAt ordering. --- main_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main_test.go b/main_test.go index 2f12789..c9614f2 100644 --- a/main_test.go +++ b/main_test.go @@ -2778,6 +2778,7 @@ func TestLogsEndpoints(t *testing.T) { assert.Nil(t, links["prev"]) assert.Nil(t, links["next"]) + var prevCreatedAt *time.Time = nil for _, l := range data { assert.IsType(t, map[string]interface{}{}, l) log := l.(map[string]interface{}) @@ -2806,7 +2807,6 @@ func TestLogsEndpoints(t *testing.T) { assert.Nil(t, log["entity"]) } - var prevCreatedAt *time.Time = nil for key := range log { assert.Contains(t, []string{"id", "createdAt", "updatedAt", "message", "entity"}, key) }