1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

fixed models and added tests

This commit is contained in:
Michael Zeng 2011-10-03 17:12:30 -04:00
parent 9c55b55111
commit ba8e072e14
3 changed files with 23 additions and 2 deletions

View file

@ -37,7 +37,7 @@ module Fog
requires :threshold
alarm_definition = {
'AlarnName' => alarm_name,
'AlarmName' => alarm_name,
'ComparisonOperator' => comparison_operator,
'EvaluationPeriods' => evaluation_periods,
'MetricName' => metric_name,

View file

@ -10,7 +10,7 @@ module Fog
#alarm_names is an array of alarm names
def delete(alarm_names)
connection.list_metrics(alarm_names)
connection.delete_alarms(alarm_names)
true
end

View file

@ -0,0 +1,21 @@
Shindo.tests("AWS::CloudWatch | alarm_histories", ['aws', 'cloudwatch']) do
tests('success') do
pending
tests("#all").succeeds do
Fog::AWS[:cloud_watch].alarm_histories.all
end
new_attributes = {
:alarm_name => 'tmp-alarm',
:end_date => '',
:history_item_type => 'StateUpdate',
:max_records => 1,
:start_date => ''
}
tests('#new').returns(new_attributes) do
Fog::AWS[:cloud_watch].alarm_histories.new(new_attributes).attributes
end
end
end