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-23 17:25:20 -04:00
|
|
|
tests('success') do
|
|
|
|
|
|
|
|
tests("#describe_regions").formats(AWS::EC2::Formats::REGIONS) do
|
|
|
|
AWS[:ec2].describe_regions.body
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("#describe_regions('us-east-1')").formats(AWS::EC2::Formats::REGIONS) do
|
|
|
|
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
|
|
|
|
|
|
|
|
tests("#describe_regions('not-a-region')").raises(Excon::Errors::BadRequest) do
|
2010-05-23 17:35:31 -04:00
|
|
|
AWS[:ec2].describe_regions('not-a-region')
|
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
|