return nil instead of '' for mocks as well
This commit is contained in:
parent
b0babfe958
commit
7c85a671b2
|
@ -27,7 +27,7 @@ module Fog
|
|||
response.status = 200
|
||||
public_ip = Fog::AWS::Mock.ip_address
|
||||
data ={
|
||||
'instanceId' => '',
|
||||
'instanceId' => nil,
|
||||
'publicIp' => public_ip
|
||||
}
|
||||
@data[:addresses][public_ip] = data
|
||||
|
|
|
@ -35,7 +35,7 @@ module Fog
|
|||
response.status = 200
|
||||
snapshot_id = Fog::AWS::Mock.snapshot_id
|
||||
data = {
|
||||
'progress' => '',
|
||||
'progress' => nil,
|
||||
'snapshotId' => snapshot_id,
|
||||
'startTime' => Time.now,
|
||||
'status' => 'pending',
|
||||
|
|
|
@ -43,7 +43,7 @@ module Fog
|
|||
'attachmentSet' => [],
|
||||
'createTime' => Time.now,
|
||||
'size' => size,
|
||||
'snapshotId' => snapshot_id || '',
|
||||
'snapshotId' => snapshot_id,
|
||||
'status' => 'creating',
|
||||
'volumeId' => volume_id
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ module Fog
|
|||
response = Excon::Response.new
|
||||
response.status = 200
|
||||
if address = @data[:addresses][public_ip]
|
||||
address['instanceId'] = ''
|
||||
address['instanceId'] = nil
|
||||
response.status = 200
|
||||
response.body = {
|
||||
'requestId' => Fog::AWS::Mock.request_id,
|
||||
|
|
|
@ -107,7 +107,7 @@ module Fog
|
|||
instance = {
|
||||
'amiLaunchIndex' => i,
|
||||
'blockDeviceMapping' => [],
|
||||
'dnsName' => '',
|
||||
'dnsName' => nil,
|
||||
'imageId' => image_id,
|
||||
'instanceId' => instance_id,
|
||||
'instanceState' => { 'code' => 0, 'name' => 'pending' },
|
||||
|
@ -117,17 +117,17 @@ module Fog
|
|||
'launchTime' => Time.now,
|
||||
'monitoring' => { 'state' => options['Monitoring.Enabled'] || false },
|
||||
'placement' => { 'availabilityZone' => options['Placement.AvailabilityZone'] || Fog::AWS::Mock.availability_zone },
|
||||
'privateDnsName' => '',
|
||||
'privateDnsName' => nil,
|
||||
'productCodes' => [],
|
||||
'ramdiskId' => options['RamdiskId'] || Fog::AWS::Mock.ramdisk_id,
|
||||
'reason' => '',
|
||||
'reason' => nil,
|
||||
'rootDeviceType' => 'instance-store'
|
||||
}
|
||||
instances_set << instance
|
||||
@data[:instances][instance_id] = instance.merge({
|
||||
'groupSet' => group_set,
|
||||
'ownerId' => @owner_id,
|
||||
'privateIpAddress' => '',
|
||||
'privateIpAddress' => nil,
|
||||
'reservationId' => reservation_id,
|
||||
})
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue