2013-01-29 15:25:06 -05:00
|
|
|
Shindo.tests('Fog::Compute[:digitalocean] | list_servers request', ['digitalocean', 'compute']) do
|
2013-02-26 13:27:07 -05:00
|
|
|
|
|
|
|
@server_format = {
|
|
|
|
'id' => Integer,
|
|
|
|
'name' => String,
|
|
|
|
'image_id' => Integer,
|
|
|
|
'size_id' => Integer,
|
|
|
|
'region_id' => Integer,
|
|
|
|
'backups_active' => Fog::Nullable::Boolean,
|
|
|
|
'ip_address' => String,
|
|
|
|
'status' => String
|
|
|
|
}
|
2013-01-29 15:25:06 -05:00
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
2013-02-26 13:27:07 -05:00
|
|
|
tests('#list_servers') do
|
|
|
|
Fog::Compute[:digitalocean].list_servers.body['droplets'].each do |server|
|
|
|
|
tests('format').data_matches_schema(@server_format) do
|
|
|
|
server
|
|
|
|
end
|
|
|
|
end
|
2013-01-29 15:25:06 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|