Sha256: 0c6665fc0a37744dfb78fc667a6f52502d2cf6cfedea41848bc1a784ce838249

Contents?: true

Size: 1.09 KB

Versions: 176

Compression:

Stored size: 1.09 KB

Contents

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
      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',
      :evaluation_periods => 1,
      :metric_name => 'tmp-metric-alarm',
      :namespace => 'fog-0.11.0',
      :period => 60,
      :statistic => 'Sum',
      :threshold => 5
      }
    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

Version data entries

176 entries across 174 versions & 21 rubygems

Version Path
fog-aws-3.12.0 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.11.0 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.10.0 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.9.0 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.8.0 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.7.0 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.6.7 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.6.6 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.6.5 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.6.4 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.6.3 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.6.2 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.5.2 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.5.1 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.5.0 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.4.0 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.3.0 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.2.0 tests/models/cloud_watch/alarm_data_tests.rb
fog-aws-3.1.0 tests/models/cloud_watch/alarm_data_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aws-2.0.1/tests/models/cloud_watch/alarm_data_tests.rb