Allow OAuth SSL verification to be disabled when importing from GitHub

parent 84d13841
...@@ -7,7 +7,7 @@ module Gitlab ...@@ -7,7 +7,7 @@ module Gitlab
@client = ::OAuth2::Client.new( @client = ::OAuth2::Client.new(
config.app_id, config.app_id,
config.app_secret, config.app_secret,
github_options github_options.merge(ssl: { verify: config['verify_ssl'] })
) )
if access_token if access_token
......
...@@ -26,6 +26,7 @@ describe Gitlab::GithubImport::Client, lib: true do ...@@ -26,6 +26,7 @@ describe Gitlab::GithubImport::Client, lib: true do
end end
it 'uses supplied value' do it 'uses supplied value' do
expect(client.client.options[:connection_opts][:ssl]).to eq({ verify: false })
expect(client.api.connection_options[:ssl]).to eq({ verify: false }) expect(client.api.connection_options[:ssl]).to eq({ verify: false })
end end
end end
......
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