Skip to content

Commit

Permalink
Allow TLS tests to connect to localhost via IPv6, too
Browse files Browse the repository at this point in the history
Socket.gethostname is another option under consideration.
  • Loading branch information
michaelklishin committed May 15, 2018
1 parent 36874a2 commit 5080998
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/higher_level_api/integration/tls_connection_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
require "spec_helper"

require "socket"

unless ENV["CI"]
CERTIFICATE_DIR = ENV.fetch("BUNNY_CERTIFICATE_DIR", "./spec/tls")
puts "Will use certificates from #{CERTIFICATE_DIR}"
Expand Down Expand Up @@ -35,7 +37,7 @@
end

def local_hostname
ENV.fetch("BUNNY_RABBITMQ_HOSTNAME", "127.0.0.1")
ENV.fetch("BUNNY_RABBITMQ_HOSTNAME", "localhost")
end

context "initialized with :tls => true" do
Expand Down

0 comments on commit 5080998

Please sign in to comment.