From c7ada54e145198bda404447483628d48aa5c71f1 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Fri, 24 May 2024 18:17:18 -0500 Subject: [PATCH] fix test cases --- backend/.golangci.yml | 7 +++++-- backend/internal/core/services/main_test.go | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/.golangci.yml b/backend/.golangci.yml index a09f1ca..d4e432f 100644 --- a/backend/.golangci.yml +++ b/backend/.golangci.yml @@ -1,8 +1,9 @@ run: timeout: 10m - skip-dirs: - - internal/data/ent.* linters-settings: + errcheck: + exclude-functions: + - (net/http.ResponseWriter).Write goconst: min-len: 5 min-occurrences: 5 @@ -72,3 +73,5 @@ linters: issues: exclude-use-default: false fix: false + exclude-dirs: + - internal/data/ent.* diff --git a/backend/internal/core/services/main_test.go b/backend/internal/core/services/main_test.go index 9ae4982..05dd11e 100644 --- a/backend/internal/core/services/main_test.go +++ b/backend/internal/core/services/main_test.go @@ -56,7 +56,7 @@ func TestMain(m *testing.M) { log.Fatalf("failed opening connection to sqlite: %v", err) } - err = client.Schema.Create(tCtx) + err = client.Schema.Create(context.Background()) if err != nil { log.Fatalf("failed creating schema resources: %v", err) }