mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
corrects object_tests, also working in mock mode now
This commit is contained in:
parent
71d8953a62
commit
f1a2d1d141
1 changed files with 10 additions and 4 deletions
|
@ -49,14 +49,20 @@ Shindo.tests("Fog::Storage[:hp] | object requests", ['hp', 'storage']) do
|
|||
|
||||
tests("#get_object_http_url('#{@directory.identity}', 'fog_object', expiration timestamp)").returns(true) do
|
||||
object_url = Fog::Storage[:hp].get_object_http_url(@dir_name, 'fog_object', (Time.now + 60))
|
||||
|
||||
(object_url =~ /http:\/\/\S+\/v1\/AUTH_\S+\/#{@dir_name}\/fog_object\?temp_url_sig=\S+&temp_url_expires=\d+/) != nil
|
||||
object_url.include? "fog_object"
|
||||
object_url.include? "&temp_url_expires="
|
||||
object_url.include? "temp_url_sig="
|
||||
object_url.include? @dir_name
|
||||
object_url.start_with? "http://"
|
||||
end
|
||||
|
||||
tests("#get_object_https_url('#{@directory.identity}', 'fog_object', expiration timestamp)").returns(true) do
|
||||
object_url = Fog::Storage[:hp].get_object_https_url(@dir_name, 'fog_object', (Time.now + 60))
|
||||
|
||||
(object_url =~ /https:\/\/\S+\/v1\/AUTH_\S+\/#{@dir_name}\/fog_object\?temp_url_sig=\S+&temp_url_expires=\d+/) != nil
|
||||
object_url.include? "fog_object"
|
||||
object_url.include? "&temp_url_expires="
|
||||
object_url.include? "temp_url_sig="
|
||||
object_url.include? @dir_name
|
||||
object_url.start_with? "https://"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue