mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
OpenStack: update tenant_list tests
Updates the tenant_list tests to pass in *real* mode.
This commit is contained in:
parent
23f3e94756
commit
a27254badc
2 changed files with 3 additions and 2 deletions
|
@ -21,6 +21,7 @@ module Fog
|
||||||
response = Excon::Response.new
|
response = Excon::Response.new
|
||||||
response.status = [200, 204][rand(1)]
|
response.status = [200, 204][rand(1)]
|
||||||
response.body = {
|
response.body = {
|
||||||
|
'tenants_links' => [],
|
||||||
'tenants' => [
|
'tenants' => [
|
||||||
{'id' => '1',
|
{'id' => '1',
|
||||||
'description' => 'Has access to everything',
|
'description' => 'Has access to everything',
|
||||||
|
|
|
@ -4,11 +4,11 @@ Shindo.tests('Fog::Compute[:openstack] | tenant requests', ['openstack']) do
|
||||||
'id' => String,
|
'id' => String,
|
||||||
'name' => String,
|
'name' => String,
|
||||||
'enabled' => Fog::Boolean,
|
'enabled' => Fog::Boolean,
|
||||||
'description' => String
|
'description' => Fog::Nullable::String
|
||||||
}
|
}
|
||||||
|
|
||||||
tests('success') do
|
tests('success') do
|
||||||
tests('#list_tenants').formats({'tenants' => [@tenant_format]}) do
|
tests('#list_tenants').formats({'tenants_links' => Array, 'tenants' => [@tenant_format]}) do
|
||||||
Fog::Compute[:openstack].list_tenants.body
|
Fog::Compute[:openstack].list_tenants.body
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue