mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Minor fix to mocks.
This commit is contained in:
parent
f3773797c5
commit
c99fcc871c
1 changed files with 4 additions and 4 deletions
|
@ -39,19 +39,19 @@ module Fog
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
'id' => image_id,
|
'id' => image_id,
|
||||||
'server' => {"id"=>"3", "links"=>[{"href"=>"http://nova1:8774/v1.1/servers/#{server_id}", "rel"=>"bookmark"}]},
|
'server' => {"id"=>server_id, "links"=>[{"href"=>"http://nova1:8774/v1.1/servers/#{server_id}", "rel"=>"bookmark"}]},
|
||||||
'links' => [{"href"=>"http://nova1:8774/v1.1/tenantid/images/#{image_id}", "rel"=>"self"}, {"href"=>"http://nova1:8774/tenantid/images/#{image_id}", "rel"=>"bookmark"}],
|
'links' => [{"href"=>"http://nova1:8774/v1.1/tenantid/images/#{image_id}", "rel"=>"self"}, {"href"=>"http://nova1:8774/tenantid/images/#{image_id}", "rel"=>"bookmark"}],
|
||||||
'metadata' => metadata || {},
|
'metadata' => metadata || {},
|
||||||
'name' => name || "image_#{rand(999)}",
|
'name' => name || "image_#{rand(999)}",
|
||||||
'progress' => 0,
|
'progress' => 0,
|
||||||
'status' => 'SAVING',
|
'status' => 'SAVING',
|
||||||
'updated' => "",
|
'updated' => "2012-01-01T13:32:20Z",
|
||||||
'created' => ""
|
'created' => "2012-01-01T13:32:20Z"
|
||||||
}
|
}
|
||||||
|
|
||||||
self.data[:last_modified][:images][data['id']] = Time.now
|
self.data[:last_modified][:images][data['id']] = Time.now
|
||||||
self.data[:images][data['id']] = data
|
self.data[:images][data['id']] = data
|
||||||
response.headers = {'Content-Length' => '0', 'Content-Type' => 'text/html; charset=UTF-8', 'Date' => Time.now, 'Location' => "http://nova1:8774/v1.1/images/#{@image_id}"}
|
response.headers = {'Content-Length' => '0', 'Content-Type' => 'text/html; charset=UTF-8', 'Date' => Time.now, 'Location' => "http://nova1:8774/v1.1/images/#{image_id}"}
|
||||||
response.body = "" # { 'image' => data } no data is sent
|
response.body = "" # { 'image' => data } no data is sent
|
||||||
response
|
response
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue