Sha256: e81c3aebb8a6bf3ec70ebb55bb5ce60be0da8445be89dbdb5e045a2266f8c934

Contents?: true

Size: 585 Bytes

Versions: 3

Compression:

Stored size: 585 Bytes

Contents

# frozen_string_literal: true
# encoding: utf-8

require 'mongo'

describe 'Clean exit' do

  before(:all) do
    unless %w(1 true yes).include?(ENV['SOLO'])
      skip 'Set SOLO=1 in environment to run solo tests'
    end

    if %w(1 true yes).include?(ENV['EXTERNAL_DISABLED'])
      skip "Test requires external connectivity"
    end
  end

  context 'with SRV URI' do

    let(:uri) do
      'mongodb+srv://test1.test.build.10gen.cc/?tls=false'
    end

    it 'exits cleanly' do
      client = Mongo::Client.new(uri)
      client.database.collection_names.to_a
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mongo-2.18.2 spec/solo/clean_exit_spec.rb
mongo-2.18.1 spec/solo/clean_exit_spec.rb
mongo-2.18.0 spec/solo/clean_exit_spec.rb