Skip to content

Commit e5c56c6

Browse files
committed
enable a few more linters
1 parent 8424e40 commit e5c56c6

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ linters:
1818
enable:
1919
- copyloopvar
2020
- dupl
21+
- dupword
2122
- errcheck
2223
- gci
24+
- ginkgolinter
2325
- goconst
2426
- gocyclo
2527
- gofmt

internal/controller/appwrapper/node_health_monitor_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ var _ = Describe("NodeMonitor Controller", func() {
7676
Expect(err).NotTo(HaveOccurred())
7777

7878
By("Healthy cluster has no unhealthy nodes")
79-
Expect(len(noExecuteNodes)).Should(Equal(0))
79+
Expect(noExecuteNodes).Should(BeEmpty())
8080

8181
By("A node labeled EVICT is detected as unhealthy")
8282
node := getNode(node1Name.Name)
@@ -86,7 +86,7 @@ var _ = Describe("NodeMonitor Controller", func() {
8686
Expect(err).NotTo(HaveOccurred())
8787
_, err = nodeMonitor.Reconcile(ctx, reconcile.Request{NamespacedName: node2Name})
8888
Expect(err).NotTo(HaveOccurred())
89-
Expect(len(noExecuteNodes)).Should(Equal(1))
89+
Expect(noExecuteNodes).Should(HaveLen(1))
9090
Expect(noExecuteNodes).Should(HaveKey(node1Name.Name))
9191
Expect(noExecuteNodes[node1Name.Name]).Should(HaveKey("nvidia.com/gpu"))
9292

@@ -95,7 +95,7 @@ var _ = Describe("NodeMonitor Controller", func() {
9595
Expect(err).NotTo(HaveOccurred())
9696
_, err = nodeMonitor.Reconcile(ctx, reconcile.Request{NamespacedName: node2Name})
9797
Expect(err).NotTo(HaveOccurred())
98-
Expect(len(noExecuteNodes)).Should(Equal(1))
98+
Expect(noExecuteNodes).Should(HaveLen(1))
9999
Expect(noExecuteNodes).Should(HaveKey(node1Name.Name))
100100
Expect(noExecuteNodes[node1Name.Name]).Should(HaveKey("nvidia.com/gpu"))
101101

@@ -104,7 +104,7 @@ var _ = Describe("NodeMonitor Controller", func() {
104104
Expect(k8sClient.Update(ctx, node)).Should(Succeed())
105105
_, err = nodeMonitor.Reconcile(ctx, reconcile.Request{NamespacedName: node1Name})
106106
Expect(err).NotTo(HaveOccurred())
107-
Expect(len(noExecuteNodes)).Should(Equal(0))
107+
Expect(noExecuteNodes).Should(BeEmpty())
108108

109109
deleteNode(node1Name.Name)
110110
deleteNode(node2Name.Name)

0 commit comments

Comments
 (0)