Sha256: 81d8a49097a52e1e17aa495592ad9a9d4c647d59758b8a3a9322a589cc3e6189

Contents?: true

Size: 1.17 KB

Versions: 39

Compression:

Stored size: 1.17 KB

Contents

Shindo.tests('Fog::Rackspace::Monitoring | alarm_example_tests', ['rackspace','rackspace_monitoring']) do
  pending if Fog.mocking?

  account = Fog::Rackspace::Monitoring.new
  example_id = "remote.http_body_match_1"
  tests('success') do
    tests('#list alarm examples').formats(LIST_HEADERS_FORMAT) do
      account.list_alarm_examples().data[:headers]
    end
    tests('#get alarm example').formats(LIST_HEADERS_FORMAT) do
      account.get_alarm_example(example_id).data[:headers]
    end
    tests('#evaluate alarm example').formats(LIST_HEADERS_FORMAT) do
      options = { :string => "Foo"}
      account.evaluate_alarm_example(example_id,options).data[:headers]
    end
  end
  tests('failure') do
    tests('#fail to list alarm examples(-1)').raises(ArgumentError) do
      account.list_alarm_examples(-1).data[:headers]
    end
    tests('#fail to get alarm example(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
      account.get_alarm_example(-1).data[:headers]
    end
    tests('#fail to evaluate alarm example').raises(Fog::Rackspace::Monitoring::BadRequest) do
      options = { }
      account.evaluate_alarm_example(example_id,options).data[:headers]
    end
  end
end

Version data entries

39 entries across 37 versions & 6 rubygems

Version Path
fog-rackspace-0.1.6 tests/rackspace/requests/monitoring/alarm_example_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-rackspace-0.1.5/tests/rackspace/requests/monitoring/alarm_example_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-rackspace-0.1.5/tests/rackspace/requests/monitoring/alarm_example_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-rackspace-0.1.5/tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-rackspace-0.1.5 tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-rackspace-0.1.4 tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-rackspace-0.1.3 tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-rackspace-0.1.2 tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-rackspace-0.1.1 tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-rackspace-0.1.0 tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-1.37.0 tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-1.36.0 tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-1.35.0 tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-2.0.0.pre.0 tests/rackspace/requests/monitoring/alarm_example_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-1.34.0 tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-1.33.0 tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-1.32.0 tests/rackspace/requests/monitoring/alarm_example_tests.rb
fog-1.31.0 tests/rackspace/requests/monitoring/alarm_example_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/rackspace/requests/monitoring/alarm_example_tests.rb