mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[aws|cloud_watch] mark tests pending when mocked
This commit is contained in:
parent
bf844bee65
commit
2dc1bf98c7
2 changed files with 11 additions and 7 deletions
|
@ -1,22 +1,24 @@
|
|||
Shindo.tests("AWS::CloudWatch | alarm_data", ['aws', 'cloudwatch']) do
|
||||
|
||||
pending if Fog.mocking?
|
||||
|
||||
tests('success') do
|
||||
tests("#all").succeeds do
|
||||
Fog::AWS[:cloud_watch].alarm_data.all
|
||||
end
|
||||
|
||||
|
||||
alarm_name_prefix = {'AlarmNamePrefix'=>'tmp'}
|
||||
tests("#all_by_prefix").succeeds do
|
||||
tests("#all_by_prefix").succeeds do
|
||||
Fog::AWS[:cloud_watch].alarm_data.all(alarm_name_prefix)
|
||||
end
|
||||
|
||||
|
||||
namespace = 'AWS/EC2'
|
||||
metric_name = 'CPUUtilization'
|
||||
|
||||
tests("#get").succeeds do
|
||||
Fog::AWS[:cloud_watch].alarm_data.get(namespace, metric_name).to_json
|
||||
end
|
||||
|
||||
|
||||
new_attributes = {
|
||||
:alarm_name => 'tmp-alarm',
|
||||
:comparison_operator => 'GreaterThanOrEqualToThreshold',
|
||||
|
@ -30,11 +32,11 @@ Shindo.tests("AWS::CloudWatch | alarm_data", ['aws', 'cloudwatch']) do
|
|||
tests('#new').returns(new_attributes) do
|
||||
Fog::AWS[:cloud_watch].alarm_data.new(new_attributes).attributes
|
||||
end
|
||||
|
||||
|
||||
tests('#create').returns(new_attributes) do
|
||||
Fog::AWS[:cloud_watch].alarm_data.create(new_attributes).attributes
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
Shindo.tests("AWS::CloudWatch | alarm_histories", ['aws', 'cloudwatch']) do
|
||||
|
||||
pending if Fog.mocking?
|
||||
|
||||
tests('success') do
|
||||
tests("#all").succeeds do
|
||||
Fog::AWS[:cloud_watch].alarm_histories.all
|
||||
end
|
||||
|
||||
|
||||
new_attributes = {
|
||||
:alarm_name => 'tmp-alarm',
|
||||
:end_date => '',
|
||||
|
|
Loading…
Reference in a new issue