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
|
|
|
|
|
2010-05-26 01:26:20 -04:00
|
|
|
tests("#describe_regions('not-a-region')").raises(Fog::AWS::EC2::Error) 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
|