Sha256: e6685207f60481a078fc79d27088a3918a6bc41207a256982ed15c86ba7ecefe

Contents?: true

Size: 1 KB

Versions: 103

Compression:

Stored size: 1 KB

Contents

Shindo.tests('AWS::CloudWatch | metric requests', ['aws', 'cloudwatch']) do
  tests('success') do

    @metrics_statistic_format = {
      'GetMetricStatisticsResult' => {
        'Label' => String,
        'Datapoints' => [{
          "Timestamp" => Time,
          'Unit' => String,
          'Minimum' => Float,
          'Maximum' => Float,
          'Average' => Float,
          'Sum' => Float,
          'SampleCount' => Float
        }],    
      },
      'ResponseMetadata' => {
        'RequestId' => String
      }
    }

    tests("#get_metric_statistics").formats(@metrics_statistic_format) do
      pending if Fog.mocking?
      instanceId = 'i-420c352f'
      Fog::AWS[:cloud_watch].get_metric_statistics({'Statistics' => ['Minimum','Maximum','Sum','SampleCount','Average'], 'StartTime' => (Time.now-600).iso8601, 'EndTime' => Time.now.iso8601, 'Period' => 60, 'MetricName' => 'DiskReadBytes', 'Namespace' => 'AWS/EC2', 'Dimensions' => [{'Name' => 'InstanceId', 'Value' => instanceId}]}).body
    end
  end
end

Version data entries

103 entries across 103 versions & 17 rubygems

Version Path
fog-1.22.0 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-1.21.0 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.19.0.20140212012611 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-1.20.0 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-1.19.0 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb