Sha256: 85e8437401c9837086f6421c8178777370c2253b2280e1318d2955d107295119

Contents?: true

Size: 608 Bytes

Versions: 16

Compression:

Stored size: 608 Bytes

Contents

#!/usr/bin/env ruby

require File.join(File.dirname(__FILE__), '_common.rb')
db = Mongo.new(DEFAULT_HOST, DEFAULT_PORT).db(DEFAULT_DB)

db.collection('test').insert({'test' => 1})
admin = db.admin

if $DEBUG
  db.drop_collection('tester')
  admin.profiling_level = :slow_only
end

['test', 'pdlskwmf', '$'].each { |name|
  begin
    admin.validate_collection(name)
    puts 'true'
  rescue => ex
    puts 'false'
  end
}

level_xlation = {:off => 'off', :all => 'all', :slow_only => 'slowOnly'}
puts level_xlation[admin.profiling_level]
admin.profiling_level = :off
puts level_xlation[admin.profiling_level]

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
animehunter-mongo-0.9 tests/mongo-qa/admin
mongodb-mongo-0.10.1 tests/mongo-qa/admin
mongodb-mongo-0.10 tests/mongo-qa/admin
mongodb-mongo-0.11.1 tests/mongo-qa/admin
mongodb-mongo-0.11 tests/mongo-qa/admin
mongodb-mongo-0.12 tests/mongo-qa/admin
mongodb-mongo-0.6.1 tests/mongo-qa/admin
mongodb-mongo-0.6.2 tests/mongo-qa/admin
mongodb-mongo-0.6.3 tests/mongo-qa/admin
mongodb-mongo-0.6.4 tests/mongo-qa/admin
mongodb-mongo-0.6.5 tests/mongo-qa/admin
mongodb-mongo-0.6.6 tests/mongo-qa/admin
mongodb-mongo-0.6.7 tests/mongo-qa/admin
mongodb-mongo-0.7 tests/mongo-qa/admin
mongodb-mongo-0.8 tests/mongo-qa/admin
mongodb-mongo-0.9 tests/mongo-qa/admin