Sha256: 925306c93c7d6e46bcbc2a4c011f079ef07fd8d7659d7fe33f52a04e9d6b2bac

Contents?: true

Size: 700 Bytes

Versions: 12

Compression:

Stored size: 700 Bytes

Contents

class SSLTest < Test::Unit::TestCase

  def setup
    # This is similar to how jruby 1.6.8 behaves when jruby-openssl isn't
    # installed
    @original_ssl_config = NewRelic::Agent.config[:ssl]
    NewRelic::Agent.config.apply_config(:ssl => true)
    NewRelic::Agent.agent = NewRelic::Agent::Agent.new
    Net::HTTPSession.any_instance.stubs('use_ssl=').raises(LoadError)
  end

  def teardown
    NewRelic::Agent.config.apply_config(:ssl => @original_ssl_config)
  end

  def test_agent_shuts_down_when_ssl_is_on_but_unavailable
    ::NewRelic::Agent.agent.expects(:shutdown)
    ::NewRelic::Agent.expects(:finish_setup).never
    ::NewRelic::Agent.agent.connect_in_foreground
  ensure
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
wd_newrelic_rpm-3.5.8 test/multiverse/suites/agent_only/ssl_test.rb
sundawg_newrelic_rpm-3.5.8.2 test/multiverse/suites/agent_only/ssl_test.rb
sundawg_newrelic_rpm-3.5.8.1 test/multiverse/suites/agent_only/ssl_test.rb
newrelic_rpm-3.5.8.72 test/multiverse/suites/agent_only/ssl_test.rb
newrelic_rpm-3.5.8.70 test/multiverse/suites/agent_only/ssl_test.rb
newrelic_rpm-3.5.8.64.beta test/multiverse/suites/agent_only/ssl_test.rb
newrelic_rpm-3.5.7.59 test/multiverse/suites/agent_only/ssl_test.rb
newrelic_rpm-3.5.7.59.beta test/multiverse/suites/agent_only/ssl_test.rb
newrelic_rpm-3.5.7.58.beta test/multiverse/suites/agent_only/ssl_test.rb
wd_newrelic_rpm-3.5.6 test/multiverse/suites/agent_only/ssl_test.rb
newrelic_rpm-3.5.7.57.beta test/multiverse/suites/agent_only/ssl_test.rb
newrelic_rpm-3.5.6.55 test/multiverse/suites/agent_only/ssl_test.rb