Skip to content

Commit 8cc8c8a

Browse files
authored
Merge pull request #319 from kubernetes-sigs/dependabot/github_actions/golangci/golangci-lint-action-6.5.0
🌱 Bump golangci/golangci-lint-action from 6.3.2 to 6.5.0
2 parents d89e8ce + a34723a commit 8cc8c8a

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

.github/workflows/draft_release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install Go
2323
uses: actions/setup-go@v5
2424
with:
25-
go-version: '^1.21'
25+
go-version: '^1.23'
2626
# - name: generate release notes
2727
# run: |
2828
# make release-notes

.github/workflows/pullrequests.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-go@v5
1616
with:
17-
go-version: "1.21"
17+
go-version: "1.23"
1818
- name: golangci-lint
19-
uses: golangci/golangci-lint-action@v6.3.2
19+
uses: golangci/golangci-lint-action@v6.5.0
2020
with:
21-
version: v1.60.2
21+
version: v1.64.6
2222

2323
test:
2424
name: test
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions/checkout@v4
2828
- uses: actions/setup-go@v5
2929
with:
30-
go-version: "1.21"
30+
go-version: "1.23"
3131
- name: Run Tests
3232
run: make test
3333

@@ -38,7 +38,7 @@ jobs:
3838
- uses: actions/checkout@v4
3939
- uses: actions/setup-go@v5
4040
with:
41-
go-version: "1.21"
41+
go-version: "1.23"
4242
- name: run code generators
4343
run: make generate
4444
- name: run manifest generators

.golangci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ linters:
4646
- rowserrcheck
4747
- staticcheck
4848
- stylecheck
49-
- tenv
5049
- thelper
5150
- typecheck
5251
- unconvert
5352
- unparam
5453
- unused
5554
- usestdlibvars
55+
- usetesting
5656
- whitespace
5757

5858
linters-settings:
@@ -118,7 +118,6 @@ linters-settings:
118118
alias: ipamv1
119119
nolintlint:
120120
allow-unused: false
121-
allow-leading-space: false
122121
require-specific: true
123122
revive:
124123
rules:

internal/webhooks/inclusterippool_test.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ func TestPoolDeletionWithExistingIPAddresses(t *testing.T) {
7878
Client: fakeClient,
7979
}
8080

81-
g.Expect(webhook.ValidateDelete(ctx, namespacedPool)).Error().NotTo(BeNil(), "should not allow deletion when claims exist")
82-
g.Expect(webhook.ValidateDelete(ctx, globalPool)).Error().NotTo(BeNil(), "should not allow deletion when claims exist")
81+
g.Expect(webhook.ValidateDelete(ctx, namespacedPool)).Error().To(HaveOccurred(), "should not allow deletion when claims exist")
82+
g.Expect(webhook.ValidateDelete(ctx, globalPool)).Error().To(HaveOccurred(), "should not allow deletion when claims exist")
8383

8484
g.Expect(fakeClient.DeleteAllOf(ctx, &ipamv1.IPAddress{})).To(Succeed())
8585

86-
g.Expect(webhook.ValidateDelete(ctx, namespacedPool)).Error().To(BeNil(), "should allow deletion when no claims exist")
87-
g.Expect(webhook.ValidateDelete(ctx, globalPool)).Error().To(BeNil(), "should allow deletion when no claims exist")
86+
g.Expect(webhook.ValidateDelete(ctx, namespacedPool)).Error().NotTo(HaveOccurred(), "should allow deletion when no claims exist")
87+
g.Expect(webhook.ValidateDelete(ctx, globalPool)).Error().NotTo(HaveOccurred(), "should allow deletion when no claims exist")
8888
}
8989

9090
func TestUpdatingPoolInUseAddresses(t *testing.T) {
@@ -135,8 +135,8 @@ func TestUpdatingPoolInUseAddresses(t *testing.T) {
135135
namespacedPool.Spec.Addresses = []string{"10.0.0.15-10.0.0.20"}
136136
globalPool.Spec.Addresses = []string{"10.0.0.15-10.0.0.20"}
137137

138-
g.Expect(webhook.ValidateUpdate(ctx, oldNamespacedPool, namespacedPool)).Error().NotTo(BeNil(), "should not allow removing in use IPs from addresses field in pool")
139-
g.Expect(webhook.ValidateUpdate(ctx, oldGlobalPool, globalPool)).Error().NotTo(BeNil(), "should not allow removing in use IPs from addresses field in pool")
138+
g.Expect(webhook.ValidateUpdate(ctx, oldNamespacedPool, namespacedPool)).Error().To(HaveOccurred(), "should not allow removing in use IPs from addresses field in pool")
139+
g.Expect(webhook.ValidateUpdate(ctx, oldGlobalPool, globalPool)).Error().To(HaveOccurred(), "should not allow removing in use IPs from addresses field in pool")
140140
}
141141

142142
func TestDeleteSkip(t *testing.T) {
@@ -188,8 +188,8 @@ func TestDeleteSkip(t *testing.T) {
188188
Client: fakeClient,
189189
}
190190

191-
g.Expect(webhook.ValidateDelete(ctx, namespacedPool)).Error().To(BeNil())
192-
g.Expect(webhook.ValidateDelete(ctx, globalPool)).Error().To(BeNil())
191+
g.Expect(webhook.ValidateDelete(ctx, namespacedPool)).Error().NotTo(HaveOccurred())
192+
g.Expect(webhook.ValidateDelete(ctx, globalPool)).Error().NotTo(HaveOccurred())
193193
}
194194

195195
func TestInClusterIPPoolDefaulting(t *testing.T) {
@@ -701,9 +701,9 @@ func TestIPPool_Prefix(t *testing.T) {
701701
Client: fakeClient,
702702
}
703703

704-
g.Expect(webhook.validate(&v1alpha2.InClusterIPPool{}, namespacedPool)).Error().To(BeNil(), "should allow /0 prefix InClusterIPPool")
705-
g.Expect(webhook.validate(&v1alpha2.GlobalInClusterIPPool{}, globalPool)).Error().To(BeNil(), "should allow /0 prefix GlobalInClusterIPPool")
706-
g.Expect(webhook.validate(&v1alpha2.InClusterIPPool{}, emptyPrefixPool)).Error().To(BeNil(), "should allow empty prefix InClusterIPPool")
704+
g.Expect(webhook.validate(&v1alpha2.InClusterIPPool{}, namespacedPool)).Error().NotTo(HaveOccurred(), "should allow /0 prefix InClusterIPPool")
705+
g.Expect(webhook.validate(&v1alpha2.GlobalInClusterIPPool{}, globalPool)).Error().NotTo(HaveOccurred(), "should allow /0 prefix GlobalInClusterIPPool")
706+
g.Expect(webhook.validate(&v1alpha2.InClusterIPPool{}, emptyPrefixPool)).Error().NotTo(HaveOccurred(), "should allow empty prefix InClusterIPPool")
707707
}
708708

709709
func runInvalidScenarioTests(t *testing.T, tt invalidScenarioTest, pool types.GenericInClusterPool, webhook InClusterIPPool) {

0 commit comments

Comments
 (0)