From 021d01b5fb184c723a47744a27816ac2dfda392c Mon Sep 17 00:00:00 2001 From: justusbunsi Date: Sun, 17 Oct 2021 15:43:25 +0200 Subject: [PATCH] Remove useless types Signed-off-by: Steven Kriegler --- internal/api/sonarqube_test.go | 10 +++++----- internal/settings/settings_test.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/api/sonarqube_test.go b/internal/api/sonarqube_test.go index 5d4a3fc..cc6794b 100644 --- a/internal/api/sonarqube_test.go +++ b/internal/api/sonarqube_test.go @@ -84,7 +84,7 @@ func withValidRequestData(t *testing.T, mockPreparation func(*HandlerPartialMock func TestHandleSonarQubeWebhookProjectMapped(t *testing.T) { settings.Projects = []settings.Project{ - settings.Project{ + { SonarQube: struct{ Key string }{ Key: "pr-bot", }, @@ -99,7 +99,7 @@ func TestHandleSonarQubeWebhookProjectMapped(t *testing.T) { func TestHandleSonarQubeWebhookProjectNotMapped(t *testing.T) { settings.Projects = []settings.Project{ - settings.Project{ + { SonarQube: struct{ Key string }{ Key: "another-project", }, @@ -114,7 +114,7 @@ func TestHandleSonarQubeWebhookProjectNotMapped(t *testing.T) { func TestHandleSonarQubeWebhookInvalidJSONBody(t *testing.T) { settings.Projects = []settings.Project{ - settings.Project{ + { SonarQube: struct{ Key string }{ Key: "pr-bot", }, @@ -130,7 +130,7 @@ func TestHandleSonarQubeWebhookInvalidJSONBody(t *testing.T) { func TestHandleSonarQubeWebhookForPullRequest(t *testing.T) { settings.Projects = []settings.Project{ - settings.Project{ + { SonarQube: struct{ Key string }{ Key: "pr-bot", }, @@ -147,7 +147,7 @@ func TestHandleSonarQubeWebhookForPullRequest(t *testing.T) { func TestHandleSonarQubeWebhookForBranch(t *testing.T) { settings.Projects = []settings.Project{ - settings.Project{ + { SonarQube: struct{ Key string }{ Key: "pr-bot", }, diff --git a/internal/settings/settings_test.go b/internal/settings/settings_test.go index 051c27f..8c5522a 100644 --- a/internal/settings/settings_test.go +++ b/internal/settings/settings_test.go @@ -253,7 +253,7 @@ func TestLoadProjectsStructure(t *testing.T) { Load(os.TempDir()) expectedProjects := []Project{ - Project{ + { SonarQube: struct{ Key string }{ Key: "gitea-sonarqube-pr-bot", },