Sha256: fe31ca00ab10c6cf196d70e36775a69ce398b6fe1675e8fe00bbeab9fce23029

Contents?: true

Size: 730 Bytes

Versions: 9

Compression:

Stored size: 730 Bytes

Contents

# frozen_string_literal: true
# rubocop:todo all

require 'lite_spec_helper'

# These tests test the configurations described in
# https://github.com/mongodb/specifications/blob/master/source/ocsp-support/tests/README.rst#integration-tests-permutations-to-be-tested
describe 'OCSP connectivity' do
  require_ocsp_connectivity
  clear_ocsp_cache

  let(:client) do
    new_local_client(ENV.fetch('MONGODB_URI'),
      server_selection_timeout: 5,
    )
  end

  if ENV['OCSP_CONNECTIVITY'] == 'fail'
    it 'fails to connect' do
      lambda do
        client.command(ping: 1)
      end.should raise_error(Mongo::Error::NoServerAvailable, /UNKNOWN/)
    end
  else
    it 'works' do
      client.command(ping: 1)
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
mongo-2.21.0 spec/integration/ocsp_connectivity_spec.rb
mongo-2.20.1 spec/integration/ocsp_connectivity_spec.rb
mogno-2.20.0 spec/integration/ocsp_connectivity_spec.rb
mogno-1.0.0 spec/integration/ocsp_connectivity_spec.rb
mongo-2.20.0 spec/integration/ocsp_connectivity_spec.rb
mongo-2.19.3 spec/integration/ocsp_connectivity_spec.rb
mongo-2.19.2 spec/integration/ocsp_connectivity_spec.rb
mongo-2.19.1 spec/integration/ocsp_connectivity_spec.rb
mongo-2.19.0 spec/integration/ocsp_connectivity_spec.rb