Sha256: 71b0696764b1e3e983e76ac0d68cf03b3d114b8a7ac002c410f02004839d2cd2

Contents?: true

Size: 729 Bytes

Versions: 18

Compression:

Stored size: 729 Bytes

Contents

# frozen_string_literal: true
# encoding: utf-8

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

18 entries across 18 versions & 1 rubygems

Version Path
mongo-2.16.4 spec/integration/ocsp_connectivity_spec.rb
mongo-2.17.4 spec/integration/ocsp_connectivity_spec.rb
mongo-2.18.3 spec/integration/ocsp_connectivity_spec.rb
mongo-2.18.2 spec/integration/ocsp_connectivity_spec.rb
mongo-2.17.3 spec/integration/ocsp_connectivity_spec.rb
mongo-2.18.1 spec/integration/ocsp_connectivity_spec.rb
mongo-2.18.0 spec/integration/ocsp_connectivity_spec.rb
mongo-2.17.2 spec/integration/ocsp_connectivity_spec.rb
mongo-2.16.3 spec/integration/ocsp_connectivity_spec.rb
mongo-2.18.0.beta1 spec/integration/ocsp_connectivity_spec.rb
mongo-2.16.2 spec/integration/ocsp_connectivity_spec.rb
mongo-2.17.1 spec/integration/ocsp_connectivity_spec.rb
mongo-2.16.1 spec/integration/ocsp_connectivity_spec.rb
mongo-2.17.0 spec/integration/ocsp_connectivity_spec.rb
mongo-2.16.0 spec/integration/ocsp_connectivity_spec.rb
mongo-2.15.1 spec/integration/ocsp_connectivity_spec.rb
mongo-2.16.0.alpha1 spec/integration/ocsp_connectivity_spec.rb
mongo-2.15.0 spec/integration/ocsp_connectivity_spec.rb