From 4317c9d1b02b094708a561c2b96b1dc7e6cf3b4e Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Fri, 10 Feb 2012 15:07:26 -0500 Subject: [PATCH] minor: allow customization of mongod via environment var for testing via jenkins --- test/tools/repl_set_manager.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/tools/repl_set_manager.rb b/test/tools/repl_set_manager.rb index 8c2bceb..0752e34 100644 --- a/test/tools/repl_set_manager.rb +++ b/test/tools/repl_set_manager.rb @@ -13,6 +13,7 @@ class ReplSetManager attr_accessor :host, :start_port, :ports, :name, :mongods, :tags, :version def initialize(opts={}) + @mongod = ENV['mongod'] || 'mongod' @start_port = opts[:start_port] || 30000 @ports = [] @name = opts[:name] || 'replica-set-foo' @@ -124,7 +125,7 @@ class ReplSetManager end def start_cmd(n) - @mongods[n]['start'] = "mongod --replSet #{@name} --logpath '#{@mongods[n]['log_path']}' " + + @mongods[n]['start'] = "#{@mongod} --replSet #{@name} --logpath '#{@mongods[n]['log_path']}' " + "--oplogSize #{@oplog_size} #{journal_switch} --dbpath #{@mongods[n]['db_path']} --port #{@mongods[n]['port']} --fork" @mongods[n]['start'] += " --dur" if @durable @mongods[n]['start'] += " --smallfiles" if @smallfiles