mirror of
https://github.com/mattermost/mattermost.git
synced 2026-02-14 16:24:28 -05:00
Add tests for both Go and Python ServeHTTP implementations covering: - Body chunking behavior (small, exact, multiple, large bodies) - Context cancellation during body streaming - Header conversion utilities - HTTPRequest/HTTPResponseWriter helper classes - Request body assembly from multiple chunks - Error handling (500 for handler errors, 404 for missing handler) Go tests: - TestChunking_* for body chunking scenarios - TestConvertHTTPHeaders for header conversion - TestBuildRequestInit for request metadata building - TestWriteResponseHeaders for response header writing - TestContextCancellation_DuringBodyRead for cancellation Python tests: - TestHTTPRequest for request wrapper class - TestHTTPResponseWriter for response writer class - TestHeaderConversion for proto<->dict conversion - TestServeHTTPServicer for gRPC servicer behavior - TestChunkingBehavior for body assembly - TestCancellation for request cancellation Also: - Fixed sendRequest to properly set body_complete flag on EOF - Added ServeHTTP to HookName enum Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_client_smoke.py | ||
| test_codegen_imports.py | ||
| test_hook_registry.py | ||
| test_hook_runner.py | ||
| test_hooks_command_config.py | ||
| test_hooks_grpc_integration.py | ||
| test_hooks_http.py | ||
| test_hooks_lifecycle.py | ||
| test_hooks_messages.py | ||
| test_hooks_notifications.py | ||
| test_hooks_system.py | ||
| test_hooks_user_channel.py | ||
| test_plugin_bootstrap.py | ||
| test_posts_files_kv.py | ||
| test_users_teams_channels.py | ||