зеркало из https://github.com/microsoft/fog.git
[ec2] small fixes for mock inconsistencies
This commit is contained in:
Родитель
ae5041d304
Коммит
49ad07201e
|
@ -49,7 +49,7 @@ module Fog
|
|||
'status' => 'attaching',
|
||||
'volumeId' => volume_id
|
||||
}
|
||||
volume['attachmentSet'] << data
|
||||
volume['attachmentSet'] = [data]
|
||||
response.status = 200
|
||||
response.body = {
|
||||
'requestId' => Fog::AWS::Mock.request_id
|
||||
|
|
|
@ -80,11 +80,14 @@ module Fog
|
|||
when 'rebooting'
|
||||
instance['instanceState'] = { 'code' => 16, 'name' => 'running' }
|
||||
when 'shutting-down'
|
||||
if Time.now - @data[:deleted_at][instance['instanceId']] > 2
|
||||
if Time.now - @data[:deleted_at][instance['instanceId']] > 1
|
||||
instance['instanceState'] = { 'code' => 16, 'name' => 'terminating' }
|
||||
elsif Time.now - @data[:deleted_at][instance['instanceId']] > 2
|
||||
@data[:deleted_at].delete(instance['instanceId'])
|
||||
@data[:instances].delete(instance['instanceId'])
|
||||
end
|
||||
when 'terminating'
|
||||
if Time.now - @data[:deleted_at][instance['instanceId']] > 4
|
||||
if Time.now - @data[:deleted_at][instance['instanceId']] > 1
|
||||
@data[:deleted_at].delete(instance['instanceId'])
|
||||
@data[:instances].delete(instance['instanceId'])
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче