Sha256: 1176a3b985fceb459f14b54f44f8d5a6845362398614f77ef358eac9f7855deb

Contents?: true

Size: 1.07 KB

Versions: 44

Compression:

Stored size: 1.07 KB

Contents

Shindo.tests('Fog::Rackspace::Queues | queue_tests', ['rackspace']) do
  service = Fog::Rackspace::Queues.new

  tests('success') do
    queue_name = 'fog' + Time.now.to_i.to_s

    tests("#create_queue(#{queue_name})").succeeds do
      service.create_queue(queue_name)
    end

    tests("#list_queues").formats(LIST_QUEUES_FORMAT) do
      response = service.list_queues
      response.body
    end

    tests("#get_queue(#{queue_name})").formats(QUEUE_FORMAT) do
      service.get_queue(queue_name).body
    end

    tests("#get_queue_stats(#{queue_name})").formats(QUEUE_STATS_FORMAT) do
      service.get_queue_stats(queue_name).body
    end

    tests("#delete_queue(#{queue_name})").succeeds do
      service.delete_queue(queue_name)
    end
  end

  tests('failure') do
    tests("#create_queue('') => Invalid Create Critera").raises(Fog::Rackspace::Queues::MethodNotAllowed) do
      service.create_queue('')
    end

    tests("#get_queue('nonexistentqueue') => Does not exist").raises(Fog::Rackspace::Queues::NotFound) do
      service.get_queue('nonexistentqueue')
    end
  end
end

Version data entries

44 entries across 42 versions & 7 rubygems

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