increment the desired capacity

This commit is contained in:
Anuj Biyani 2013-05-31 15:30:14 -07:00
parent 67c907aa04
commit 20b59fb132
2 changed files with 9 additions and 1 deletions

View File

@ -21,5 +21,7 @@ class AwsHaRelease
@group.update(max_size: @group.max_size + 1) @group.update(max_size: @group.max_size + 1)
@max_size_change += 1 @max_size_change += 1
end end
@group.update(desired_capacity: @group.desired_capacity + 1)
end end
end end

View File

@ -48,10 +48,16 @@ describe 'aws-ha-release' do
@group.update(max_size: 1, desired_capacity: 1) @group.update(max_size: 1, desired_capacity: 1)
expect(@aws_ha_release.max_size_change).to eq 0 expect(@aws_ha_release.max_size_change).to eq 0
AWS::FakeAutoScaling::Group.any_instance.should_receive(:update).with({ max_size: 2 })
@aws_ha_release.execute! @aws_ha_release.execute!
expect(@group.max_size).to eq 2
expect(@aws_ha_release.max_size_change).to eq 1 expect(@aws_ha_release.max_size_change).to eq 1
end end
it 'increases the desired capacity by 1' do
@aws_ha_release.execute!
expect(@group.desired_capacity).to eq 2
end
end end
end end