mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
fixed tests and style
This commit is contained in:
parent
f04f984fb2
commit
ce64a73342
@ -75,14 +75,16 @@ void ReplicasStatusHandler::handleRequest(Poco::Net::HTTPServerRequest & request
|
||||
const auto & config = context.getConfigRef();
|
||||
setResponseDefaultHeaders(response, config.getUInt("keep_alive_timeout", 10));
|
||||
|
||||
if (!ok) {
|
||||
if (!ok)
|
||||
{
|
||||
response.setStatusAndReason(Poco::Net::HTTPResponse::HTTP_SERVICE_UNAVAILABLE);
|
||||
verbose = true;
|
||||
}
|
||||
|
||||
if (verbose)
|
||||
response.send() << message.rdbuf();
|
||||
else {
|
||||
else
|
||||
{
|
||||
const char * data = "Ok.\n";
|
||||
response.sendBuffer(data, strlen(data));
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ def test_defaults_http_handlers():
|
||||
assert 'Ok.\n' == cluster.instance.http_request('ping', method='GET').content
|
||||
|
||||
assert 200 == cluster.instance.http_request('replicas_status', method='get').status_code
|
||||
assert 'ok.\n' == cluster.instance.http_request('replicas_status', method='get').content
|
||||
assert 'Ok.\n' == cluster.instance.http_request('replicas_status', method='get').content
|
||||
|
||||
assert 200 == cluster.instance.http_request('replicas_status?verbose=1', method='get').status_code
|
||||
assert '\n' == cluster.instance.http_request('replicas_status?verbose=1', method='get').content
|
||||
|
Loading…
Reference in New Issue
Block a user