Skip to content

Commit ce85904

Browse files
committed
Make SSL connections independent from files in ~/.postgresql
Certificate files in this directory led to test failures before.
1 parent b44bb81 commit ce85904

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/helpers.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ def define_testing_conninfo
214214
ENV['PGPORT'] ||= "54321"
215215
@port = ENV['PGPORT'].to_i
216216
ENV['PGHOST'] = 'localhost'
217-
@conninfo = "host=localhost port=#{@port} dbname=test"
217+
td = TEST_DIRECTORY + 'data'
218+
@conninfo = "host=localhost port=#{@port} dbname=test sslrootcert=#{td + 'ruby-pg-ca-cert'} sslcert=#{td + 'ruby-pg-client-cert'} sslkey=#{td + 'ruby-pg-client-key'}"
218219
@unix_socket = TEST_DIRECTORY.to_s
219220
end
220221

0 commit comments

Comments
 (0)