Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit 85aa651

Browse files
uniemimumadalazar
authored andcommitted
gas lint fixes
New golangci-lint version introduced new issues. Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
1 parent d194bab commit 85aa651

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

gpu-aware-scheduling/.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ linters:
77
enable-all: true
88
disable:
99
- paralleltest
10+
- depguard
1011
- exhaustivestruct
1112

1213
linters-settings:

gpu-aware-scheduling/pkg/gpuscheduler/node_resource_cache.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,13 +729,11 @@ func (c *Cache) startPodWork(stopChannel <-chan struct{}) {
729729
}
730730

731731
func (c *Cache) podWorkerRun() {
732-
//nolint:revive
733732
for c.podWork() {
734733
}
735734
}
736735

737736
func (c *Cache) nodeWorkerRun() {
738-
//nolint:revive
739737
for c.nodeWork() {
740738
}
741739
}

gpu-aware-scheduling/pkg/gpuscheduler/scheduler_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,9 @@ func TestSchedulingLogicBadParams(t *testing.T) {
249249

250250
Convey("When I call getNodeForName with empty params", t, func() {
251251
mockCache.On("FetchNode", mock.Anything, mock.Anything).Return(nil, errMock).Once()
252+
var nilNode *v1.Node
252253
result, err := gas.getNodeForName("")
253-
So(result, ShouldEqual, nil)
254+
So(result, ShouldEqual, nilNode)
254255
So(err, ShouldNotBeNil)
255256
})
256257

@@ -554,7 +555,7 @@ func TestDecodeRequest(t *testing.T) {
554555

555556
Convey("When decoding something not really JSON", t, func() {
556557
request, err := http.NewRequestWithContext(context.Background(),
557-
http.MethodPost, "http://foo/bar", bytes.NewBuffer([]byte("foo")))
558+
http.MethodPost, "http://foo/bar", bytes.NewBufferString("foo"))
558559
So(err, ShouldBeNil)
559560
request.Header.Set("Content-Type", "application/json")
560561
err = gas.decodeRequest("foo", request)
@@ -1117,6 +1118,8 @@ func TestRunSchedulingLogicWithMultiContainerXelinkedTileResourceReq(t *testing.
11171118

11181119
Convey("When running scheduling logic with multi-container pod with tile request", t, func() {
11191120
for _, testCase := range testCases {
1121+
t.Logf("test %v", testCase.description)
1122+
11201123
pod := getFakePod()
11211124
mockNode := getMockNode(4, 4, "card0", "card1", "card2", "card3")
11221125
pod.Spec = *getMockPodSpecMultiContXeLinked(2)

0 commit comments

Comments
 (0)