Skip to content

Commit

Permalink
refactor: Removing useless shadowing
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <bob@vibioh.fr>
  • Loading branch information
ViBiOh committed Apr 3, 2024
1 parent a37e37f commit f410a82
Show file tree
Hide file tree
Showing 20 changed files with 0 additions and 120 deletions.
2 changes: 0 additions & 2 deletions pkg/ketchup/renderer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ func TestMin(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 0 additions & 2 deletions pkg/middleware/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ func TestMiddleware(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
10 changes: 0 additions & 10 deletions pkg/model/ketchup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ func TestParseKetchupFrequency(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -100,8 +98,6 @@ func TestKetchupByRepositoryID(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -183,8 +179,6 @@ func TestKetchupByPriority(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -224,8 +218,6 @@ func TestReleaseByRepositoryID(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -265,8 +257,6 @@ func TestReleaseByKindAndName(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
8 changes: 0 additions & 8 deletions pkg/model/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ func TestString(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -72,8 +70,6 @@ func TestURL(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -113,8 +109,6 @@ func TestCompareURL(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -154,8 +148,6 @@ func TestParseRepositoryKind(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 0 additions & 2 deletions pkg/model/semver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ func TestCheckPatternsMatching(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 0 additions & 2 deletions pkg/model/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ func TestReadUser(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
8 changes: 0 additions & 8 deletions pkg/notifier/notifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ func TestFlags(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -116,8 +114,6 @@ func TestGetNewRepositoryReleases(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -243,8 +239,6 @@ func TestGetKetchupToNotify(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -441,8 +435,6 @@ func TestSendNotification(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
4 changes: 0 additions & 4 deletions pkg/notifier/releases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ func TestGetNewStandardReleases(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -183,8 +181,6 @@ func TestGetNewHelmReleases(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 0 additions & 2 deletions pkg/provider/docker/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ func TestGetNextURL(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 0 additions & 2 deletions pkg/provider/github/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ func TestFlags(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 0 additions & 2 deletions pkg/scheduler/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ func TestFlags(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 0 additions & 2 deletions pkg/semver/pattern_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ func TestCheck(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
6 changes: 0 additions & 6 deletions pkg/semver/semver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ func TestIsGreater(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -146,8 +144,6 @@ func TestCompare(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -295,8 +291,6 @@ func TestParse(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
12 changes: 0 additions & 12 deletions pkg/service/ketchup/ketchup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ func TestList(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -124,8 +122,6 @@ func TestListForRepositories(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -221,8 +217,6 @@ func TestCreate(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -368,8 +362,6 @@ func TestUpdate(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -509,8 +501,6 @@ func TestDelete(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -637,8 +627,6 @@ func TestCheck(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
16 changes: 0 additions & 16 deletions pkg/service/repository/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ func TestList(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -135,8 +133,6 @@ func TestSuggest(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -264,8 +260,6 @@ func TestGetOrCreate(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -383,8 +377,6 @@ func TestCreate(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -493,8 +485,6 @@ func TestUpdate(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -588,8 +578,6 @@ func TestClean(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -694,8 +682,6 @@ func TestCheck(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -778,8 +764,6 @@ func TestSanitizeName(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
6 changes: 0 additions & 6 deletions pkg/service/user/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ func TestStoreInContext(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -161,8 +159,6 @@ func TestCreate(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -270,8 +266,6 @@ func TestCheck(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
t.Parallel()

Expand Down
Loading

0 comments on commit f410a82

Please sign in to comment.