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
|
Shindo.tests("AWS::CloudWatch | alarm_data", ['aws', 'cloudwatch']) do
|
||||||
|
|
||||||
|
pending if Fog.mocking?
|
||||||
|
|
||||||
tests('success') do
|
tests('success') do
|
||||||
tests("#all").succeeds do
|
tests("#all").succeeds do
|
||||||
Fog::AWS[:cloud_watch].alarm_data.all
|
Fog::AWS[:cloud_watch].alarm_data.all
|
||||||
end
|
end
|
||||||
|
|
||||||
alarm_name_prefix = {'AlarmNamePrefix'=>'tmp'}
|
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)
|
Fog::AWS[:cloud_watch].alarm_data.all(alarm_name_prefix)
|
||||||
end
|
end
|
||||||
|
|
||||||
namespace = 'AWS/EC2'
|
namespace = 'AWS/EC2'
|
||||||
metric_name = 'CPUUtilization'
|
metric_name = 'CPUUtilization'
|
||||||
|
|
||||||
tests("#get").succeeds do
|
tests("#get").succeeds do
|
||||||
Fog::AWS[:cloud_watch].alarm_data.get(namespace, metric_name).to_json
|
Fog::AWS[:cloud_watch].alarm_data.get(namespace, metric_name).to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
new_attributes = {
|
new_attributes = {
|
||||||
:alarm_name => 'tmp-alarm',
|
:alarm_name => 'tmp-alarm',
|
||||||
:comparison_operator => 'GreaterThanOrEqualToThreshold',
|
:comparison_operator => 'GreaterThanOrEqualToThreshold',
|
||||||
|
@ -30,11 +32,11 @@ Shindo.tests("AWS::CloudWatch | alarm_data", ['aws', 'cloudwatch']) do
|
||||||
tests('#new').returns(new_attributes) do
|
tests('#new').returns(new_attributes) do
|
||||||
Fog::AWS[:cloud_watch].alarm_data.new(new_attributes).attributes
|
Fog::AWS[:cloud_watch].alarm_data.new(new_attributes).attributes
|
||||||
end
|
end
|
||||||
|
|
||||||
tests('#create').returns(new_attributes) do
|
tests('#create').returns(new_attributes) do
|
||||||
Fog::AWS[:cloud_watch].alarm_data.create(new_attributes).attributes
|
Fog::AWS[:cloud_watch].alarm_data.create(new_attributes).attributes
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
Shindo.tests("AWS::CloudWatch | alarm_histories", ['aws', 'cloudwatch']) do
|
Shindo.tests("AWS::CloudWatch | alarm_histories", ['aws', 'cloudwatch']) do
|
||||||
|
|
||||||
|
pending if Fog.mocking?
|
||||||
|
|
||||||
tests('success') do
|
tests('success') do
|
||||||
tests("#all").succeeds do
|
tests("#all").succeeds do
|
||||||
Fog::AWS[:cloud_watch].alarm_histories.all
|
Fog::AWS[:cloud_watch].alarm_histories.all
|
||||||
end
|
end
|
||||||
|
|
||||||
new_attributes = {
|
new_attributes = {
|
||||||
:alarm_name => 'tmp-alarm',
|
:alarm_name => 'tmp-alarm',
|
||||||
:end_date => '',
|
:end_date => '',
|
||||||
|
|
Loading…
Reference in a new issue