mongo-ruby-driver/test/tools/auth_repl_set_manager.rb
2011-02-02 11:26:31 -05:00

15 lines
381 B
Ruby

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