mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[aws|compute] Emulate volume unavailability when mocking
This commit is contained in:
parent
bf7f269ce6
commit
5c5ccc349a
1 changed files with 2 additions and 0 deletions
|
@ -43,6 +43,8 @@ module Fog
|
|||
instance = @data[:instances][instance_id]
|
||||
volume = @data[:volumes][volume_id]
|
||||
if instance && volume
|
||||
raise Fog::AWS::Compute::Error.new("Client.VolumeInUse => Volume #{volume_id} is unavailable") unless volume['status'] == 'available'
|
||||
|
||||
data = {
|
||||
'attachTime' => Time.now,
|
||||
'device' => device,
|
||||
|
|
Loading…
Add table
Reference in a new issue