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-1.30.0 tests/rackspace/requests/queues/queues_tests.rb
fog-1.29.0 tests/rackspace/requests/queues/queues_tests.rb
fog-1.28.0 tests/rackspace/requests/queues/queues_tests.rb
fog-1.27.0 tests/rackspace/requests/queues/queues_tests.rb
fog-1.26.0 tests/rackspace/requests/queues/queues_tests.rb
fog-1.25.0 tests/rackspace/requests/queues/queues_tests.rb
nsidc-fog-1.24.1 tests/rackspace/requests/queues/queues_tests.rb
fog-1.24.0 tests/rackspace/requests/queues/queues_tests.rb
ns-fog-1.22.11 tests/rackspace/requests/queues/queues_tests.rb
ns-fog-1.22.10 tests/rackspace/requests/queues/queues_tests.rb
ns-fog-1.22.9 tests/rackspace/requests/queues/queues_tests.rb
ns-fog-1.22.8 tests/rackspace/requests/queues/queues_tests.rb
ns-fog-1.22.7 tests/rackspace/requests/queues/queues_tests.rb
ns-fog-1.22.6 tests/rackspace/requests/queues/queues_tests.rb
fog-1.23.0 tests/rackspace/requests/queues/queues_tests.rb
ns-fog-1.22.4 tests/rackspace/requests/queues/queues_tests.rb
ns-fog-1.22.3 tests/rackspace/requests/queues/queues_tests.rb
ns-fog-1.22.2 tests/rackspace/requests/queues/queues_tests.rb
fog-1.22.1 tests/rackspace/requests/queues/queues_tests.rb
fog-1.22.0 tests/rackspace/requests/queues/queues_tests.rb