Commit 6beafbc9 by jsa

don't check meaningless "ok" field in output from Tire config endpoint

its value is always true regardless of cluster health, and it is removed
in ES v1.x.
parent 280ce78e
......@@ -192,7 +192,7 @@ get '/heartbeat' do
es_ok = false
begin
es_status = get_es_status
es_ok = ( es_status["ok"] == true and es_status["status"] == 200 )
es_ok = es_status["status"] == 200
rescue
end
error 500, JSON.generate({"OK" => false, "check" => "es"}) unless es_ok
......
......@@ -106,15 +106,11 @@ describe "app" do
end
it "reports success when es is ready" do
test_es_check({"ok" => true, "status" => 200}, true)
end
it "reports failure when es is not ok" do
test_es_check({"ok" => false, "status" => 200}, false)
test_es_check({"status" => 200}, true)
end
it "reports failure when es status is unexpected" do
test_es_check({"ok" => true, "status" => 201}, false)
test_es_check({"status" => 503}, false)
end
it "reports failure when es status is malformed" do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment