Sha256: 935bd109e8065409415e0dae25d492f08d430852380f3d7e5ecd9ba3d45a6163

Contents?: true

Size: 1.35 KB

Versions: 78

Compression:

Stored size: 1.35 KB

Contents

Shindo.tests('Fog::Rackspace::Monitoring | entity_tests', ['rackspace','rackspace_monitoring']) do
  account = Fog::Rackspace::Monitoring.new
  entity_id = nil
  tests('success') do
    tests('#create new entity').formats(DATA_FORMAT) do
      response = account.create_entity(:label => "Foo").data
      @entity_id = response[:headers]["X-Object-ID"]
      response
    end
    tests('#get entity').formats(LIST_HEADERS_FORMAT) do
      account.get_entity(@entity_id).data[:headers]
    end
    tests('#update entity').formats(DATA_FORMAT) do
      options = { :metadata => {:testing => "Bar" }}
      account.update_entity(@entity_id,options).data
    end
    tests('#delete entity').formats(DELETE_DATA_FORMAT) do
      account.delete_entity(@entity_id).data
    end
  end
  tests('failure') do
    tests('#create new entity(-1)').raises(Fog::Rackspace::Monitoring::BadRequest) do
      account.create_entity(:label => "")
    end
    tests('#get entity(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
      account.get_entity(-1)
    end
    tests('#update invalid entity(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
      options = { :metadata => {:testing => "Bar" }}
      response = account.update_entity(-1,options)
    end
    tests('#delete entity(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
      account.delete_entity(-1)
    end
  end
end

Version data entries

78 entries across 76 versions & 7 rubygems

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