Sha256: cb29bac2a84b9edf5cbb3ff96106e2e0cc05d2d4681b5499ebbc5a28da63e7d4

Contents?: true

Size: 857 Bytes

Versions: 16

Compression:

Stored size: 857 Bytes

Contents

require 'spec_helper'

describe 'Roqua::StatusChecks::CheckLoadBalancerMember' do
  it 'returns true when the status file contains on' do
    allow(File).to receive(:read).and_return('on')

    expect(Roqua::StatusChecks::CheckLoadBalancerMember.balancer_member?('foo/bar')).to be_truthy
  end

  it 'returns false when the status file does not contain off' do
    allow(File).to receive(:read).and_return('off')

    expect(Roqua::StatusChecks::CheckLoadBalancerMember.balancer_member?('foo/bar')).to be_falsey
  end

  it 'raises InvalidStatus error when the status file contains something else' do
    allow(File).to receive(:read).and_return('foo')

    expect { Roqua::StatusChecks::CheckLoadBalancerMember.balancer_member?('foo/bar') }
      .to raise_error(Roqua::StatusChecks::CheckLoadBalancerMember::InvalidStatus, 'Invalid state: foo')
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
roqua-support-0.4.4 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.4.3 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.4.2 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.4.1 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.4.0 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.3.5 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.3.4 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.3.3 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.3.2 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.3.1 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.3.0 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.1.34 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.1.33 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.1.32 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.1.31 spec/roqua/status_checks/check_load_balancer_member_spec.rb
roqua-support-0.1.30 spec/roqua/status_checks/check_load_balancer_member_spec.rb