mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[compute|aws] Fix create_volume mock when creating from a snapshot.
This commit is contained in:
parent
f2b2fc2323
commit
c8e2300760
1 changed files with 2 additions and 2 deletions
|
@ -45,8 +45,8 @@ module Fog
|
|||
raise Fog::Compute::AWS::NotFound.new("The snapshot '#{snapshot_id}' does not exist.")
|
||||
end
|
||||
|
||||
if snapshot && size && size != snapshot['volumeSize']
|
||||
raise Fog::Compute::AWS::NotFound.new("The snapshot '#{snapshot_id}' with the specified size of '#{size}' does not exist.")
|
||||
if snapshot && size && size < snapshot['volumeSize']
|
||||
raise Fog::Compute::AWS::NotFound.new("The snapshot '#{snapshot_id}' has size #{snapshot['volumeSize']} which is greater than #{size}.")
|
||||
elsif snapshot && !size
|
||||
size = snapshot['volumeSize']
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue