mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[digitalocean|compute] additional test coverage and some maintenance
* Add created_at field to mock response * Assert that the created_at field is returned * Update references to nonexistent images
This commit is contained in:
parent
13e3d7a010
commit
25c518cbc2
4 changed files with 6 additions and 4 deletions
|
@ -54,7 +54,8 @@ module Fog
|
|||
"image_id" => image_id,
|
||||
"region_id" => region_id,
|
||||
"ip_address" => "127.0.0.1",
|
||||
"status" => 'active'
|
||||
"status" => 'active',
|
||||
"created_at" => Time.now.strftime("%FT%TZ")
|
||||
}
|
||||
|
||||
response.body = {
|
||||
|
|
|
@ -5,7 +5,7 @@ def service
|
|||
end
|
||||
|
||||
def fog_test_server_attributes
|
||||
image = service.images.find { |i| i.name == 'Ubuntu 12.04 x64' }
|
||||
image = service.images.find { |i| i.name == 'Ubuntu 13.10 x64' }
|
||||
region = service.regions.find { |r| r.name == 'New York 1' }
|
||||
flavor = service.flavors.find { |r| r.name == '512MB' }
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ Shindo.tests('Fog::Compute[:digitalocean] | create_server request', ['digitaloce
|
|||
tests('success') do
|
||||
|
||||
tests('#create_server').formats({'status' => 'OK', 'droplet' => @server_format}) do
|
||||
image = service.images.find { |img| img.name == 'Ubuntu 12.04 x64' }
|
||||
image = service.images.find { |img| img.name == 'Ubuntu 13.10 x64' }
|
||||
flavor = service.flavors.find { |f| f.name == '512MB' }
|
||||
data = Fog::Compute[:digitalocean].create_server fog_server_name,
|
||||
flavor.id,
|
||||
|
|
|
@ -8,7 +8,8 @@ Shindo.tests('Fog::Compute[:digitalocean] | list_servers request', ['digitalocea
|
|||
'region_id' => Integer,
|
||||
'backups_active' => Fog::Nullable::Boolean,
|
||||
'ip_address' => Fog::Nullable::String,
|
||||
'status' => String
|
||||
'status' => String,
|
||||
'created_at' => String
|
||||
}
|
||||
|
||||
tests('success') do
|
||||
|
|
Loading…
Add table
Reference in a new issue