spec/support/factories/cluster_factory.rb in big_brother-0.6.8 vs spec/support/factories/cluster_factory.rb in big_brother-0.8.7

- old
+ new

@@ -1,14 +1,22 @@ class Factory def self.cluster(overrides = {}) - BigBrother::Cluster.new( + BigBrother::ClusterFactory.create_cluster( overrides.fetch(:name, 'test'), { :fwmark => 100, :scheduler => 'wrr', :check_interval => 1, :nodes => [Factory.node], :ramp_up_time => 0 }.merge(overrides) ) + end + + def self.active_passive_cluster(overrides = {}) + self.cluster(overrides.merge(:backend_mode => BigBrother::ClusterFactory::ACTIVE_PASSIVE_CLUSTER)) + end + + def self.active_active_cluster(overrides = {}) + self.cluster(overrides.merge(:backend_mode => BigBrother::ClusterFactory::ACTIVE_ACTIVE_CLUSTER)) end end