forked from aws/aws-sdk-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 1.3.9 of the AWS SDK for Ruby
Release Notes: http://aws.amazon.com/releasenotes/Ruby/9578420788370582
- Loading branch information
1 parent
8c9db39
commit e63c07e
Showing
89 changed files
with
8,001 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
|
||
# language: en | ||
@auto_scaling @activities | ||
Feature: Auto Scaling Activities | ||
|
||
Scenario: Creating a policy | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
Then the auto scaling group should have some activities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
|
||
# language: en | ||
@auto_scaling @groups | ||
Feature: Auto Scaling Groups | ||
|
||
Scenario: Creating an auto scaling group | ||
Given I create a launch configuration | ||
When I create an auto scaling group | ||
Then the auto scaling group should exist | ||
|
||
Scenario: Getting an auto scaling group | ||
Given I create a launch configuration | ||
When I create an auto scaling group | ||
And I get the auto scaling group by name | ||
Then the auto scaling group should have the options I created it with | ||
|
||
Scenario: Deleting an auto scaling group | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
When I delete the auto scaling group | ||
Then the auto scaling group should not exist | ||
|
||
Scenario: Suspending processes | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
When I suspend the "Launch" process | ||
Then the auto scaling group should contain "Launch" in the suspended processes | ||
|
||
Scenario: Suspending all processes | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
When I suspend all processes | ||
Then the auto scaling group should have all processes suspended | ||
|
||
Scenario: Resuming processes | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
And I suspend the "Launch" process | ||
When I resume the "Launch" process | ||
Then the auto scaling group should not contain "Launch" in the suspended processes | ||
|
||
Scenario: Resuming all processes | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
And I suspend all processes | ||
When I resume all processes | ||
Then the auto scaling group should have no suspended processes | ||
|
||
Scenario: Metrics collection | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
When I enable all metrics collection | ||
Then the auto scaling group should have all metrics enabled for "1Minute" | ||
When I disable all metrics collection | ||
Then the auto scaling group should have no enabled metrics. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
|
||
# language: en | ||
@auto_scaling @instances | ||
Feature: Auto Scaling Instances | ||
|
||
@slow | ||
Scenario: Creating notification configurations | ||
Given I create a launch configuration | ||
When I create an auto scaling group | ||
Then eventually there should be an auto scaling instance | ||
And the auto scaling instance should exist | ||
And the auto scaling should have a matching ec2 instance | ||
And the auto scaling should have a matching ec2 instance | ||
And the auto scaling should have the correct launch configuration | ||
And the auto scaling should have the correct launch configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
|
||
# language: en | ||
@auto_scaling @launch_configurations | ||
Feature: Auto Scaling Launch Configurations | ||
|
||
Scenario: Creating a launch configuration | ||
When I create a launch configuration | ||
Then the launch configuration should exist | ||
|
||
Scenario: Deleting a launch configuration | ||
Given I create a launch configuration | ||
When I delete the launch configuration | ||
Then the launch configuration should not exist | ||
|
||
@ec2 | ||
Scenario: Launch configuration attributes | ||
Given I create a key pair | ||
And I create 2 security groups | ||
And I create a launch configuration with options | ||
When I get the launch configuraiton by name | ||
Then the launch configuraiton should have the same attributes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
|
||
# language: en | ||
@auto_scaling @notification_configurations @sns | ||
Feature: Auto Scaling Notification Configurations | ||
|
||
Scenario: Creating notification configurations | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
And I create an SNS topic | ||
When I create a notification configuration for the group | ||
Then the auto scaling group should have the notification configuration | ||
|
||
Scenario: Deleting notification configurations | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
And I create an SNS topic | ||
When I create a notification configuration for the group | ||
And I delete the notification configuration | ||
Then the group should have no notification configurations | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
|
||
# language: en | ||
@auto_scaling @scaling_policies | ||
Feature: Auto Scaling Policies | ||
|
||
Scenario: Creating a policy | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
When I create an auto scaling policy | ||
Then the auto scaling policy should exist | ||
And the auto scaling group policies should include the policy | ||
|
||
Scenario: Deleting policy | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
And I create an auto scaling policy | ||
When I delete the auto scaling policy | ||
Then the auto scaling policy should not exist | ||
And the auto scaling group policies should not include the policy | ||
|
||
Scenario: Getting policy attributes | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
And I create a scaling policy with the following options: | ||
| OPT | VALUE | | ||
| adjustment_type | ChangeInCapacity | | ||
| scaling_adjustment | 2 | | ||
When I get the scaling policy by name | ||
Then the auto scaling policy adjustent type should be "ChangeInCapacity" | ||
And the auto scaling policy scaling adjustent should be 2 | ||
And the cooldown should be nil | ||
|
||
Scenario: Updating a scaling policy | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
And I create a scaling policy with the following options: | ||
| OPT | VALUE | | ||
| adjustment_type | ChangeInCapacity | | ||
| scaling_adjustment | 2 | | ||
When I update the scaling policy with the following options: | ||
| OPT | VALUE | | ||
| adjustment_type | ExactCapacity | | ||
| scaling_adjustment | 3 | | ||
| cooldown | 1 | | ||
When I get the scaling policy by name | ||
Then the auto scaling policy adjustent type should be "ExactCapacity" | ||
And the auto scaling policy scaling adjustent should be 3 | ||
And the cooldown should be 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
|
||
# language: en | ||
@auto_scaling @scheduled_actions | ||
Feature: Auto Scaling Scheduled Actions | ||
|
||
Scenario: Create a scheduled action | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
When I create a scheduled action | ||
Then the auto scaling group should have 1 scheduled action | ||
|
||
Scenario: Getting a scheduled action | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
And I create a scheduled action | ||
When I get the scheduled action by name | ||
Then the scheduled action should have the correct attributes | ||
|
||
Scenario: Enumerating scheduled actions | ||
Given I create a launch configuration | ||
And I create an auto scaling group | ||
And I create a scheduled action | ||
Then the scheduled action should be in the list of scheduled actions | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
|
||
Then /^the auto scaling group should have some activities$/ do | ||
eventually do | ||
@auto_scaling_group.activities.count.should > 0 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
|
||
Before("@auto_scaling") do | ||
|
||
@as = AWS::AutoScaling.new | ||
@as_client = @as.client | ||
|
||
@created_launch_configurations = [] | ||
@created_auto_scaling_groups = [] | ||
|
||
end | ||
|
||
After("@auto_scaling") do | ||
|
||
@created_auto_scaling_groups.each do |group| | ||
begin | ||
group.delete! | ||
rescue AWS::AutoScaling::Errors::ValidationError | ||
# already deleted | ||
end | ||
end | ||
|
||
@created_launch_configurations.each do |launch_config| | ||
begin | ||
launch_config.delete | ||
rescue AWS::AutoScaling::Errors::ValidationError | ||
# throws a name validation error when it cant find a launch | ||
# configuration with the given name -- already deleted | ||
end | ||
end | ||
|
||
end |
Oops, something went wrong.