Sha256: ba1b69b85b603a2056fa19f73848c97f0654623e1863022995dfd09b27559450

Contents?: true

Size: 669 Bytes

Versions: 3

Compression:

Stored size: 669 Bytes

Contents

class Factory
  def self.cluster(overrides = {})
    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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
big_brother-0.8.8.1 spec/support/factories/cluster_factory.rb
big_brother-0.8.8 spec/support/factories/cluster_factory.rb
big_brother-0.8.7 spec/support/factories/cluster_factory.rb