Skip to content

Commit 5ce8e83

Browse files
committed
chore: fix typo in variable name in test mocks
1 parent a289eaa commit 5ce8e83

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

internal/server/common_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var tool4 = MockTool{
7070
var tool5 = MockTool{
7171
Name: "require_client_auth_tool",
7272
Params: []parameters.Parameter{},
73-
requiresClientAuthrorization: true,
73+
requiresClientAuthorization: true,
7474
}
7575

7676
var prompt1 = MockPrompt{
@@ -213,12 +213,12 @@ func runRequest(ts *httptest.Server, method, path string, body io.Reader, header
213213
if err != nil {
214214
return nil, nil, fmt.Errorf("unable to send request: %w", err)
215215
}
216+
defer resp.Body.Close()
216217

217218
respBody, err := io.ReadAll(resp.Body)
218219
if err != nil {
219220
return nil, nil, fmt.Errorf("unable to read request body: %w", err)
220221
}
221-
defer resp.Body.Close()
222222

223223
return resp, respBody, nil
224224
}

internal/server/mocks.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type MockTool struct {
3232
Params []parameters.Parameter
3333
manifest tools.Manifest
3434
unauthorized bool
35-
requiresClientAuthrorization bool
35+
requiresClientAuthorization bool
3636
}
3737

3838
func (t MockTool) Invoke(context.Context, tools.SourceProvider, parameters.ParamValues, tools.AccessToken) (any, util.ToolboxError) {
@@ -68,7 +68,7 @@ func (t MockTool) Authorized(verifiedAuthServices []string) bool {
6868

6969
func (t MockTool) RequiresClientAuthorization(tools.SourceProvider) (bool, error) {
7070
// defaulted to false
71-
return t.requiresClientAuthrorization, nil
71+
return t.requiresClientAuthorization, nil
7272
}
7373

7474
func (t MockTool) GetParameters() parameters.Parameters {

0 commit comments

Comments
 (0)