mongo-ruby-driver/test/tools/auth_repl_set_manager.rb

15 lines
381 B
Ruby
Raw Permalink Normal View History

require File.join((File.expand_path(File.dirname(__FILE__))), 'repl_set_manager')
class AuthReplSetManager < ReplSetManager
def initialize(opts={})
super(opts)
@key_path = opts[:key_path] || File.join(File.expand_path(File.dirname(__FILE__)), "keyfile.txt")
system("chmod 600 #{@key_path}")
end
def start_cmd(n)
super + " --keyFile #{@key_path}"
end
end