mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Added first test of successful list metrics
This commit is contained in:
parent
d0f8e79b4c
commit
efb1c4acb4
2 changed files with 28 additions and 0 deletions
|
@ -7,6 +7,8 @@ class AWS < Fog::Bin
|
|||
Fog::AWS::CDN
|
||||
when :cloud_formation
|
||||
Fog::AWS::CloudFormation
|
||||
when :cloud_watch
|
||||
Fog::AWS::CloudWatch
|
||||
when :compute
|
||||
Fog::AWS::Compute
|
||||
when :dns
|
||||
|
@ -38,6 +40,8 @@ class AWS < Fog::Bin
|
|||
Fog::CDN.new(:provider => 'AWS')
|
||||
when :cloud_formation
|
||||
Fog::AWS::CloudFormation.new
|
||||
when :cloud_watch
|
||||
Fog::AWS::CloudWatch.new
|
||||
when :compute
|
||||
Fog::Compute.new(:provider => 'AWS')
|
||||
when :dns
|
||||
|
|
24
tests/aws/requests/cloud_watch/metric_tests.rb
Normal file
24
tests/aws/requests/cloud_watch/metric_tests.rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
Shindo.tests('AWS::CloudWatch | metric requests', ['aws', 'cloudwatch']) do
|
||||
|
||||
tests('success') do
|
||||
@metrics_list_format = {
|
||||
'ListMetricsResult' => {
|
||||
'Metrics' =>
|
||||
[{
|
||||
'Dimensions' =>
|
||||
[{
|
||||
'Name' => String,
|
||||
'Value' => String
|
||||
}],
|
||||
"MetricName" => String,
|
||||
"Namespace" => String
|
||||
}],
|
||||
},
|
||||
'ResponseMetadata' => {"RequestId"=> String}
|
||||
}
|
||||
|
||||
tests("#list_metrics").formats(@metrics_list_format) do
|
||||
AWS[:cloud_watch].list_metrics.body
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue