From bf44337db1599c907ac77fbfabbd364df2716c99 Mon Sep 17 00:00:00 2001 From: Kofo Okesola Date: Wed, 8 Nov 2023 10:55:59 +0100 Subject: [PATCH] lint fixes --- pumps/graph_mongo_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pumps/graph_mongo_test.go b/pumps/graph_mongo_test.go index 376e826a8..74410708a 100644 --- a/pumps/graph_mongo_test.go +++ b/pumps/graph_mongo_test.go @@ -50,16 +50,17 @@ func TestGraphMongoPump_WriteData(t *testing.T) { for i := range records { record := sampleRecord record.GraphQLStats = stats - if i == 0 { + switch i { + case 0: record.GraphQLStats.HasErrors = false - } else if i == 1 { + case 1: record.GraphQLStats.HasErrors = true record.GraphQLStats.Errors = []analytics.GraphError{ { Message: "test error", }, } - } else { + default: record.GraphQLStats.HasErrors = true } records[i] = record