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

adds object tests for get_http_url, get_https_url

This commit is contained in:
Julian Weber 2013-10-08 12:12:31 +02:00
parent 0e89acdcc8
commit ec632cd9d0

View file

@ -41,6 +41,18 @@ Shindo.tests('Fog::Storage[:openstack] | object requests', ["openstack"]) do
Fog::Storage[:openstack].delete_object('fogobjecttests', 'fog_object')
end
tests("#get_object_http_url('#{@directory.identity}', 'fog_object', expiration timestamp)").returns(true) do
object_url = Fog::Storage[:openstack].get_object_http_url(@directory.identity, 'fog_object', (Time.now + 60))
(object_url =~ /http:\/\/\S+\/v1\/AUTH_\S+\/#{@directory.identity}\/fog_object\?temp_url_sig=\S+&temp_url_expires=\d+/) != nil
end
tests("#get_object_https_url('#{@directory.identity}', 'fog_object', expiration timestamp)").returns(true) do
object_url = Fog::Storage[:openstack].get_object_https_url(@directory.identity, 'fog_object', (Time.now + 60))
(object_url =~ /https:\/\/\S+\/v1\/AUTH_\S+\/#{@directory.identity}\/fog_object\?temp_url_sig=\S+&temp_url_expires=\d+/) != nil
end
tests("put_object with block") do
pending if Fog.mocking?
@ -163,7 +175,6 @@ Shindo.tests('Fog::Storage[:openstack] | object requests', ["openstack"]) do
end
end
end
end
unless Fog.mocking?