Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorerlingsson committed Oct 11, 2024
1 parent 20516e1 commit 747f567
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/amqproxy/http_server_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ base_addr = "http://localhost:15673"

describe AMQProxy::HTTPServer do
it "GET /healthz returns 200" do
with_http_server do |http, amqproxy|
with_http_server do
response = HTTP::Client.get("#{base_addr}/healthz")
response.status_code.should eq 200
end
end

it "GET /metrics returns 200" do
with_http_server do |http, amqproxy|
with_http_server do
response = HTTP::Client.get("#{base_addr}/metrics")
response.status_code.should eq 200
end
end

it "GET /metrics returns correct metrics" do
with_http_server do |http, amqproxy, proxy_url|
with_http_server do |_http, _amqproxy, proxy_url|
AMQP::Client.start(proxy_url) do |conn|
ch = conn.channel
_ch = conn.channel
response = HTTP::Client.get("#{base_addr}/metrics")
response.body.split("\n").each do |line|
if line.starts_with?("amqproxy_client_connections")
Expand Down

0 comments on commit 747f567

Please sign in to comment.