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:
parent
0e89acdcc8
commit
ec632cd9d0
1 changed files with 12 additions and 1 deletions
|
@ -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?
|
||||
|
|
Loading…
Reference in a new issue