Sha256: 76db71de7c6142a372001adeb48e0a52bb0e894e986dab34eb0e85b73f258b69

Contents?: true

Size: 1023 Bytes

Versions: 79

Compression:

Stored size: 1023 Bytes

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

79 entries across 77 versions & 6 rubygems

Version Path
fog-aws-0.9.0 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.8.1 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.8.0 tests/requests/cloud_watch/get_metric_statistics_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-aws-0.7.5/tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.7.6 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.7.5 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.7.4 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.7.3 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.7.2 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.6.0 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.5.0 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.4.1 tests/requests/cloud_watch/get_metric_statistics_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/aws/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.4.0 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.3.0 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.2.2 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.2.0 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.1.2 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.1.1 tests/requests/cloud_watch/get_metric_statistics_tests.rb
fog-aws-0.1.0 tests/requests/cloud_watch/get_metric_statistics_tests.rb