1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

fix missing response.remote_ip

This commit is contained in:
Ryan Richard 2013-08-30 18:57:39 -05:00
parent 7304b5e600
commit 3cf548fbdc
7 changed files with 9 additions and 12 deletions

View file

@ -33,7 +33,7 @@ module Fog
"Content-Length" => "0",
"Content-Type" => "text/plain",
}
response.remote_ip = "1.1.1.1"
response.remote_ip = Fog::Rackspace::MockData.ipv4_address
response
end
end

View file

@ -38,7 +38,7 @@ module Fog
"Vary" => "Accept-Encoding",
"Transfer-Encoding" => "chunked"
}
response.remote_ip = "1.1.1.1"
response.remote_ip = Fog::Rackspace::MockData.ipv4_address
response
end
end

View file

@ -49,7 +49,7 @@ module Fog
"Vary" => "Accept-Encoding",
"Transfer-Encoding" => "chunked"
}
response.remote_ip = Fog::Rackspace::MockData.ipv4_address
response
end
end

View file

@ -28,15 +28,8 @@ module Fog
response = Excon::Response.new
response.status = 200
response.body = {
"id" => entity_id.to_s,
"id" => entity_id,
"label" => entity_label,
"ip_addresses" => {
"access_ip0_v6" => Fog::Rackspace::MockData.ipv6_address,
"public0_v4" => Fog::Rackspace::MockData.ipv4_address,
"public1_v6" => Fog::Rackspace::MockData.ipv6_address,
"access_ip1_v4" => Fog::Rackspace::MockData.ipv4_address,
"private0_v4" => Fog::Rackspace::MockData.ipv4_address
},
"metadata" => nil,
"managed" => false,
"uri" => "https://ord.servers.api.rackspacecloud.com/" + account_id + "/servers/" + server_id,
@ -57,6 +50,8 @@ module Fog
"Vary" => "Accept-Encoding",
"Transfer-Encoding" => "chunked"
}
response.remote_ip = Fog::Rackspace::MockData.ipv4_address
response
end
end
end

View file

@ -45,6 +45,7 @@ module Fog
"Vary" => "Accept-Encoding",
"Transfer-Encoding" => "chunked"
}
response.remote_ip = Fog::Rackspace::MockData.ipv4_address
response
end
end

View file

@ -62,6 +62,7 @@ module Fog
"Vary" => "Accept-Encoding",
"Transfer-Encoding" => "chunked"
}
response.remote_ip = Fog::Rackspace::MockData.ipv4_address
response
end
end

View file

@ -9,7 +9,7 @@ Shindo.tests('Fog::Rackspace::Monitoring | entity_tests', ['rackspace','rackspac
response
end
tests('#get entity').formats(LIST_HEADERS_FORMAT) do
account.get_entity(:entity_id => "fooid")
account.get_entity(:entity_id => "fooid").data[:headers]
end
tests('#update entity').formats(DATA_FORMAT) do
options = { :metadata => {:testing => "Bar" }}