1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[rackspace|queues] Added :rackspace_queues_client_id to tests to make it easier to run; Couple other PR tweaks

This commit is contained in:
Brian Hartsock 2013-09-03 20:52:51 -04:00
parent d3468b134c
commit 42b77110ac
11 changed files with 11 additions and 12 deletions

View file

@ -37,7 +37,7 @@ module Fog
end
#Helper method to claim (dequeue) a single message, including destroying it
def dequeue(ttl, grace, options = {})
def dequeue(ttl, grace, options = {}, &block)
claim = claims.create(
options.merge(
{

View file

@ -2,7 +2,7 @@ Shindo.tests('Fog::Rackspace::Queues | claim', ['rackspace']) do
pending if Fog.mocking?
service = Fog::Rackspace::Queues.new
service = Fog::Rackspace::Queues.new(:rackspace_queues_client_id => 'test_client')
queue = service.queues.create({
:name => "fog_queue_#{Time.now.to_i.to_s}",
})

View file

@ -2,7 +2,7 @@ Shindo.tests('Fog::Rackspace::Queues | claims', ['rackspace']) do
pending if Fog.mocking?
service = Fog::Rackspace::Queues.new
service = Fog::Rackspace::Queues.new(:rackspace_queues_client_id => 'test_client')
queue = service.queues.create({
:name => "fog_queue_#{Time.now.to_i.to_s}",
})

View file

@ -2,7 +2,7 @@ Shindo.tests('Fog::Rackspace::Queues | message', ['rackspace']) do
pending if Fog.mocking?
service = Fog::Rackspace::Queues.new
service = Fog::Rackspace::Queues.new(:rackspace_queues_client_id => 'test_client')
queue = service.queues.create({
:name => "fog_instance_#{Time.now.to_i.to_s}",
})

View file

@ -2,7 +2,7 @@ Shindo.tests('Fog::Rackspace::Queues | messages', ['rackspace']) do
pending if Fog.mocking?
service = Fog::Rackspace::Queues.new
service = Fog::Rackspace::Queues.new(:rackspace_queues_client_id => 'test_client')
queue = service.queues.create({
:name => "fog_queue_#{Time.now.to_i.to_s}",
})

View file

@ -2,7 +2,7 @@ Shindo.tests('Fog::Rackspace::Queues | queue', ['rackspace']) do
pending if Fog.mocking?
service = Fog::Rackspace::Queues.new
service = Fog::Rackspace::Queues.new(:rackspace_queues_client_id => 'test_client')
options = {
:name => "fog_instance_#{Time.now.to_i.to_s}",
}

View file

@ -2,7 +2,7 @@ Shindo.tests('Fog::Rackspace::Queues | queues', ['rackspace']) do
pending if Fog.mocking?
service = Fog::Rackspace::Queues.new
service = Fog::Rackspace::Queues.new(:rackspace_queues_client_id => 'test_client')
options = {
:name => "fog_instance_#{Time.now.to_i.to_s}",
}

View file

@ -9,7 +9,7 @@ Shindo.tests('Fog::Rackspace::Queues', ['rackspace']) do
end
tests('#authentication_method') do
@service = Fog::Rackspace::Queues.new
@service = Fog::Rackspace::Queues.new(:rackspace_queues_client_id => 'test_client')
assert_method nil, :authenticate_v2

View file

@ -2,7 +2,7 @@
pending if Fog.mocking?
service = Fog::Rackspace::Queues.new
service = Fog::Rackspace::Queues.new(:rackspace_queues_client_id => 'test_client')
queue_name = 'fog' + Time.now.to_i.to_s
client_id = 'fog-client-' + Time.now.to_i.to_s
@ -51,7 +51,6 @@
end
tests('failure') do
#TODO - Escalate to queueing team
tests("#get_claim('queue_name', 'nonexistentclaim') => Does not exist").raises(Fog::Rackspace::Queues::ServiceError) do
service.get_claim(queue_name, 'nonexistentclaim')
end

View file

@ -2,7 +2,7 @@ Shindo.tests('Fog::Rackspace::Queues | messages_tests', ['rackspace']) do
pending if Fog.mocking?
service = Fog::Rackspace::Queues.new
service = Fog::Rackspace::Queues.new(:rackspace_queues_client_id => 'test_client')
queue_name = 'fog' + Time.now.to_i.to_s
client_id = 'fog-client-' + Time.now.to_i.to_s

View file

@ -2,7 +2,7 @@ Shindo.tests('Fog::Rackspace::Queues | queue_tests', ['rackspace']) do
pending if Fog.mocking?
service = Fog::Rackspace::Queues.new
service = Fog::Rackspace::Queues.new(:rackspace_queues_client_id => 'test_client')
tests('success') do