mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 14:21:14 +00:00
Add writeRPCResponse and writeHTTPResponse helpers, that handle the way RPC responses are written to HTTP replies. These replace the exported helpers. Visible effects: - JSON results are now marshaled without indentation. - HTTP status codes are now normalized. - Cache control headers are no longer set. Details: - When writing a response to a URL (GET) request, do not marshal the whole JSON-RPC object into the body, only encode the result or the error object. This is a user-visible change. - Do not change the HTTP status code for RPC errors. The RPC error already reports what went wrong, the HTTP status should only report problems with the HTTP transaction itself. This is a user-visible change. - Encode JSON without indentation in POST response bodies. This is mainly cosmetic but saves quite a bit of response data. Indent is still applied to GET responses to make life easier for code examples. - Remove an obsolete TODO about reporting an HTTP error on websocket upgrade. Nothing needed to change; the upgrader already reports an error. - Report an HTTP error when starting the server loop fails. - Improve logging for encoding errors. - Log less aggressively.
Tendermint Tests
The unit tests (ie. the go test s) can be run with make test.
The integration tests can be run with make test_integrations.
Running the integrations test will build a docker container with local version of tendermint and run the following tests in docker containers:
- go tests, with --race
- includes test coverage
- app tests
- kvstore app over socket
- persistence tests
- crash tendermint at each of many predefined points, restart, and ensure it syncs properly with the app
Fuzzing
Fuzzing of various system inputs.
See ./fuzz/README.md for more details.