Skip to content

Commit b8500b9

Browse files
authored
fix: update test expectations to match actual error messages (#592)
2 parents 1f975f8 + 93dcde5 commit b8500b9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/server/register_tools_from_backend_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ func TestRegisterToolsFromBackend_BackendError(t *testing.T) {
239239
// Attempt to register tools should fail with backend error
240240
err = us.registerToolsFromBackend("error-backend")
241241
require.Error(err, "Should fail when backend returns error")
242-
require.Contains(err.Error(), "backend error listing tools", "Error should mention backend error")
243-
require.Contains(err.Error(), "code=-32603", "Error should include error code")
242+
require.Contains(err.Error(), "failed to list tools", "Error should mention failed to list tools")
243+
require.Contains(err.Error(), "unable to list tools", "Error should include backend error message")
244244
}
245245

246246
// TestRegisterToolsFromBackend_InvalidJSON tests that registration
@@ -310,7 +310,7 @@ func TestRegisterToolsFromBackend_InvalidJSON(t *testing.T) {
310310
// Attempt to register tools should fail with JSON parsing error
311311
err = us.registerToolsFromBackend("invalid-json-backend")
312312
require.Error(err, "Should fail to parse invalid JSON")
313-
require.Contains(err.Error(), "failed to parse tools", "Error should mention parsing failure")
313+
require.Contains(err.Error(), "cannot unmarshal", "Error should mention JSON unmarshal failure")
314314
}
315315

316316
// TestRegisterToolsFromBackend_EmptyToolList tests that registration

0 commit comments

Comments
 (0)