Skip to content

Commit edbec37

Browse files
committed
fix: address golangci-lint unused parameter errors in tests
Signed-off-by: Abhinav Singh <abhinavsingh717073@gmail.com>
1 parent 885b3e6 commit edbec37

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/workloadmanager/handlers_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ func TestHandleGetSandbox(t *testing.T) {
576576

577577
if tc.enableAuth {
578578
// Mock extractUserInfo to simulate the authenticated user's namespace
579-
patches.ApplyFunc(extractUserInfo, func(c *gin.Context) (string, string, string, string) {
579+
patches.ApplyFunc(extractUserInfo, func(_ *gin.Context) (string, string, string, string) {
580580
return "mock-token", tc.userNamespace, "mock-project", "mock-sa"
581581
})
582582
}
@@ -666,15 +666,15 @@ func TestHandleListSandboxes(t *testing.T) {
666666
patches := gomonkey.NewPatches()
667667
defer patches.Reset()
668668

669-
patches.ApplyMethod(reflect.TypeOf((*fakeStore)(nil)), "ListSandboxesByKind", func(_ *fakeStore, _ context.Context, kind string) ([]*types.SandboxInfo, error) {
669+
patches.ApplyMethod(reflect.TypeOf((*fakeStore)(nil)), "ListSandboxesByKind", func(_ *fakeStore, _ context.Context, _ string) ([]*types.SandboxInfo, error) {
670670
if tc.storeErr != nil {
671671
return nil, tc.storeErr
672672
}
673673
return tc.storeResult, nil
674674
})
675675

676676
if tc.enableAuth {
677-
patches.ApplyFunc(extractUserInfo, func(c *gin.Context) (string, string, string, string) {
677+
patches.ApplyFunc(extractUserInfo, func(_ *gin.Context) (string, string, string, string) {
678678
return "mock-token", tc.userNamespace, "mock-project", "mock-sa"
679679
})
680680
}

0 commit comments

Comments
 (0)