2010-05-23 17:25:20 -04:00
|
|
|
Shindo.tests('AWS::EC2 | region requests', ['aws']) do
|
2010-05-23 17:35:31 -04:00
|
|
|
|
2010-05-26 18:22:23 -04:00
|
|
|
@regions_format = {
|
|
|
|
'regionInfo' => [{
|
|
|
|
'regionEndpoint' => String,
|
|
|
|
'regionName' => String
|
|
|
|
}],
|
|
|
|
'requestId' => String
|
|
|
|
}
|
|
|
|
|
2010-05-23 17:25:20 -04:00
|
|
|
tests('success') do
|
|
|
|
|
2010-05-26 18:22:23 -04:00
|
|
|
tests("#describe_regions").formats(@regions_format) do
|
2010-05-23 17:25:20 -04:00
|
|
|
AWS[:ec2].describe_regions.body
|
|
|
|
end
|
|
|
|
|
2010-05-26 18:22:23 -04:00
|
|
|
tests("#describe_regions('us-east-1')").formats(@regions_format) do
|
2010-05-23 17:25:20 -04:00
|
|
|
AWS[:ec2].describe_regions('us-east-1').body
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2010-05-23 17:35:31 -04:00
|
|
|
|
2010-05-23 17:25:20 -04:00
|
|
|
tests('failure') do
|
|
|
|
|
2010-05-26 21:03:22 -04:00
|
|
|
tests("#describe_regions('us-east-2')").raises(Fog::AWS::EC2::Error) do
|
|
|
|
AWS[:ec2].describe_regions('us-east-2')
|
2010-05-23 17:25:20 -04:00
|
|
|
end
|
|
|
|
end
|
2010-05-23 17:35:31 -04:00
|
|
|
|
2010-05-23 17:25:20 -04:00
|
|
|
end
|