minor: allow customization of mongod via environment var for testing via jenkins
This commit is contained in:
parent
08ca57b92c
commit
4317c9d1b0
|
@ -13,6 +13,7 @@ class ReplSetManager
|
||||||
attr_accessor :host, :start_port, :ports, :name, :mongods, :tags, :version
|
attr_accessor :host, :start_port, :ports, :name, :mongods, :tags, :version
|
||||||
|
|
||||||
def initialize(opts={})
|
def initialize(opts={})
|
||||||
|
@mongod = ENV['mongod'] || 'mongod'
|
||||||
@start_port = opts[:start_port] || 30000
|
@start_port = opts[:start_port] || 30000
|
||||||
@ports = []
|
@ports = []
|
||||||
@name = opts[:name] || 'replica-set-foo'
|
@name = opts[:name] || 'replica-set-foo'
|
||||||
|
@ -124,7 +125,7 @@ class ReplSetManager
|
||||||
end
|
end
|
||||||
|
|
||||||
def start_cmd(n)
|
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"
|
"--oplogSize #{@oplog_size} #{journal_switch} --dbpath #{@mongods[n]['db_path']} --port #{@mongods[n]['port']} --fork"
|
||||||
@mongods[n]['start'] += " --dur" if @durable
|
@mongods[n]['start'] += " --dur" if @durable
|
||||||
@mongods[n]['start'] += " --smallfiles" if @smallfiles
|
@mongods[n]['start'] += " --smallfiles" if @smallfiles
|
||||||
|
|
Loading…
Reference in New Issue