Skip to content

Commit

Permalink
test: Add spec test
Browse files Browse the repository at this point in the history
  • Loading branch information
a18e committed Mar 18, 2024
1 parent 109249b commit ee7a9f7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/haproxy/templates/haproxy_config/healthcheck_listener_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,15 @@
expect(healthcheck_listener).to include('bind :1234')
end
end

context 'when ha_proxy.accept_proxy is true' do
let(:properties) do
default_properties.merge({ 'accept_proxy' => true })
end

it 'sets expect-proxy with exception for LOCALHOST' do
expect(healthcheck_listener).to include('tcp-request connection expect-proxy layer4 unless LOCALHOST')
end
end
end
end

0 comments on commit ee7a9f7

Please sign in to comment.