From dc557a67435169d87e42219d505f3f9cf558e0aa Mon Sep 17 00:00:00 2001 From: ashwiniag Date: Sun, 22 Dec 2024 15:02:37 +0530 Subject: [PATCH] fix lints --- internal/restapi/v1/integrations/get_test.go | 3 +-- internal/restapi/v1/integrations/put_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/internal/restapi/v1/integrations/get_test.go b/internal/restapi/v1/integrations/get_test.go index 377aafe..ca2ff37 100644 --- a/internal/restapi/v1/integrations/get_test.go +++ b/internal/restapi/v1/integrations/get_test.go @@ -39,8 +39,7 @@ func TestGetIntegration(t *testing.T) { assert.Equal(t, "linear", res.Type) // Test case: Invalid UUID - invalidUUID := "c60c700e-3dd9-4059-8372-f772358c" - parsedUUID, err := uuid.Parse(invalidUUID) + parsedUUID, _ := uuid.Parse("c60c700e-3dd9-4059-8372-f772358c") req = integrations.GetIntegrationRequests{parsedUUID} err = handler(context.Background(), req, res) assert.Error(t, err) diff --git a/internal/restapi/v1/integrations/put_test.go b/internal/restapi/v1/integrations/put_test.go index 1412e77..0cbe904 100644 --- a/internal/restapi/v1/integrations/put_test.go +++ b/internal/restapi/v1/integrations/put_test.go @@ -2,6 +2,7 @@ package integrations_test import ( "context" + "fmt" "github.com/shinobistack/gokakashi/internal/restapi/v1/integrations" "testing" @@ -48,8 +49,7 @@ func TestUpdateIntegration(t *testing.T) { func TestUpdateIntegration_InvalidUUID(t *testing.T) { client := enttest.Open(t, "sqlite3", "file:ent?mode=memory&cache=shared&_fk=1") defer client.Close() - invalidUUID := "c60c700e-3dd9-4059-8372-f77235" - parsedUUID, err := uuid.Parse(invalidUUID) + parsedUUID, _ := uuid.Parse("c60c700e-3dd9-4059-8372-f77235") req := integrations.UpdateIntegrationRequest{ ID: parsedUUID, @@ -58,8 +58,8 @@ func TestUpdateIntegration_InvalidUUID(t *testing.T) { var res integrations.GetIntegrationResponse handler := integrations.UpdateIntegration(client) - err = handler(context.Background(), req, &res) - + err := handler(context.Background(), req, &res) + fmt.Println(err) assert.Error(t, err) }