increment the desired capacity
This commit is contained in:
		
							parent
							
								
									67c907aa04
								
							
						
					
					
						commit
						20b59fb132
					
				| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Anuj Biyani
						Anuj Biyani