From abd9d6bdba7d893e193c7336f67c0b034d5c547b Mon Sep 17 00:00:00 2001 From: Deluan Date: Sun, 24 May 2026 21:59:20 -0300 Subject: [PATCH] test(participants): use neutral names to avoid gosec false positive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The G101 'potential hardcoded credentials' lint flagged a struct field named CreditedAs paired with a string literal. The artist names in the dedup-merge test are arbitrary — rename to plain placeholders. --- model/participants_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/model/participants_test.go b/model/participants_test.go index 29e87b550..6ae99f603 100644 --- a/model/participants_test.go +++ b/model/participants_test.go @@ -123,32 +123,32 @@ var _ = Describe("Participants", func() { // it isn't silently dropped just because of arrival order. p1 := Participants{ RoleArtist: []Participant{ - {Artist: Artist{ID: "a1", Name: "Aphex Twin"}, CreditedAs: "AFX"}, + {Artist: Artist{ID: "a1", Name: "Canonical"}, CreditedAs: "Credit One"}, }, } p2 := Participants{ RoleArtist: []Participant{ - {Artist: Artist{ID: "a1", Name: "Aphex Twin"}, CreditedAs: "Aphex Twin"}, + {Artist: Artist{ID: "a1", Name: "Canonical"}, CreditedAs: "Credit Two"}, }, } p1.Merge(p2) Expect(p1[RoleArtist]).To(HaveLen(1)) - Expect(p1[RoleArtist][0].CreditedAs).To(Equal("Aphex Twin")) + Expect(p1[RoleArtist][0].CreditedAs).To(Equal("Credit Two")) }) It("does not overwrite an existing CreditedAs with an empty one", func() { p1 := Participants{ RoleArtist: []Participant{ - {Artist: Artist{ID: "a1", Name: "Aphex Twin"}, CreditedAs: "AFX"}, + {Artist: Artist{ID: "a1", Name: "Canonical"}, CreditedAs: "Credit One"}, }, } p2 := Participants{ RoleArtist: []Participant{ - {Artist: Artist{ID: "a1", Name: "Aphex Twin"}}, // empty CreditedAs + {Artist: Artist{ID: "a1", Name: "Canonical"}}, // empty CreditedAs }, } p1.Merge(p2) - Expect(p1[RoleArtist][0].CreditedAs).To(Equal("AFX")) + Expect(p1[RoleArtist][0].CreditedAs).To(Equal("Credit One")) }) })