Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby-openssl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c3ac283be8b6
Choose a base ref
...
head repository: jruby/jruby-openssl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 15ecf715d7d2
Choose a head ref
  • 4 commits
  • 5 files changed
  • 1 contributor

Commits on Aug 27, 2015

  1. Copy the full SHA
    d8922ab View commit details
  2. Copy the full SHA
    1e5f64f View commit details
  3. Copy the full SHA
    f8fa20e View commit details
  4. Copy the full SHA
    15ecf71 View commit details
Showing with 73 additions and 3 deletions.
  1. +7 −1 .travis.yml
  2. +19 −1 Rakefile
  3. +3 −0 src/test/integration/Gemfile
  4. +41 −0 src/test/integration/ssl_test.rb
  5. +3 −1 src/test/ruby/oaep/test_oaep.rb
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -13,11 +13,17 @@ env:
- TEST_PROFILE=test-1.7.18
- TEST_PROFILE=test-1.7.21
- TEST_PROFILE=test-9000
script: mvn verify -P $TEST_PROFILE

# script: mvn verify -P $TEST_PROFILE
script: if [[ -v TEST_COMMAND ]]; then $TEST_COMMAND; else mvn verify -P $TEST_PROFILE; fi

matrix:
exclude:
- jdk: openjdk6
env: TEST_PROFILE=test-9000
include:
- jdk: openjdk7
env: TEST_COMMAND="jruby -S rake integration:install integration:test"
notifications:
irc:
channels:
20 changes: 19 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -28,4 +28,22 @@ Rake::TestTask.new do |task|
task.verbose = true
task.loader = :direct
end
task :test => 'lib/jopenssl.jar'
task :test => 'lib/jopenssl.jar'

namespace :integration do
it_path = File.expand_path('../src/test/integration', __FILE__)
task :install do
Dir.chdir(it_path) do
ruby "-S bundle install --gemfile '#{it_path}/Gemfile'"
end
end
# desc "Run IT tests"
task :test => 'lib/jopenssl.jar' do
unless File.exist?(File.join(it_path, 'Gemfile.lock'))
raise "bundle not installed, run `rake integration:install'"
end
loader = "ARGV.each { |f| require f }"
test_files = FileList['src/test/integration/*_test.rb'].to_a
ruby "-Ilib -e \"#{loader}\" #{test_files.map { |f| "\"#{f}\"" }.join(' ')}"
end
end
3 changes: 3 additions & 0 deletions src/test/integration/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem 'httpclient', :require => false
41 changes: 41 additions & 0 deletions src/test/integration/ssl_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# coding: US-ASCII
require File.expand_path('../ruby/test_helper', File.dirname(__FILE__))

class IntegrationSSLTest < TestCase

def test_connect_http_client_1
require 'httpclient'

puts "\n"
puts "------------------------------------------------------------"
puts "-- HTTPClient.new.get 'https://www.bankofamerica.com'"
puts "------------------------------------------------------------"
puts HTTPClient.new.get('https://www.bankofamerica.com')
end

def test_connect_http_client_2
require 'httpclient'

puts "\n"
puts "------------------------------------------------------------"
puts "-- HTTPClient.new.get 'https://google.co.uk'"
puts "------------------------------------------------------------"
puts HTTPClient.new.get('https://google.co.uk')
end

def test_connect_net_http_1
require 'uri'; require 'net/https'

puts "\n"
puts "------------------------------------------------------------"
puts "-- Net::HTTP.new ... 'https://rubygems.org'"
puts "------------------------------------------------------------"

uri = URI.parse('https://rubygems.org')

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
puts http.get('/')
end

end
4 changes: 3 additions & 1 deletion src/test/ruby/oaep/test_oaep.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# coding: US-ASCII
require 'base64'
require File.expand_path('../test_helper', File.dirname(__FILE__))

class TestOaep < TestCase

def setup
super
self.class.disable_security_restrictions!
require 'base64'
end

def test_oaep_decrypt