mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[rackspace|load balancers] fixed broken tests
This commit is contained in:
parent
fa77c2ff1d
commit
56469d1d8d
10 changed files with 22 additions and 22 deletions
|
@ -41,13 +41,13 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | access_lists_tests', ['rackspace']
|
|||
end
|
||||
|
||||
tests('failure') do
|
||||
tests('create_access_rule(invalid ip)').raises(Fog::Rackspace::LoadBalancer::BadRequest) do
|
||||
tests('create_access_rule(invalid ip)').raises(Fog::Rackspace::LoadBalancers::BadRequest) do
|
||||
@service.create_access_rule(@lb.id, '', 'ALLOW')
|
||||
end
|
||||
tests('create_access_rule(invalid type)').raises(Fog::Rackspace::LoadBalancer::BadRequest) do
|
||||
tests('create_access_rule(invalid type)').raises(Fog::Rackspace::LoadBalancers::BadRequest) do
|
||||
@service.create_access_rule(@lb.id, '10.10.10.10', 'ENABLED')
|
||||
end
|
||||
tests("delete_access_rule(#{@lb.id}, 0)").raises(Fog::Rackspace::LoadBalancer::NotFound) do
|
||||
tests("delete_access_rule(#{@lb.id}, 0)").raises(Fog::Rackspace::LoadBalancers::NotFound) do
|
||||
@service.delete_access_rule(@lb.id, 0)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | algorithm_tests', ['rackspace']) d
|
|||
}
|
||||
]}
|
||||
|
||||
@service = Fog::Rackspace::LoadBalancer.new
|
||||
@service = Fog::Rackspace::LoadBalancers.new
|
||||
|
||||
tests('success') do
|
||||
tests('#list_algorithms').formats(ALGORITHMS_FORMAT) do
|
||||
|
|
|
@ -16,7 +16,7 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | connection_logging', ['rackspace']
|
|||
end
|
||||
|
||||
tests('failure') do
|
||||
tests("#set_connection_logging(#{@lb.id}, 'aaa')").raises(Fog::Rackspace::LoadBalancer::InternalServerError) do
|
||||
tests("#set_connection_logging(#{@lb.id}, 'aaa')").raises(Fog::Rackspace::LoadBalancers::InternalServerError) do
|
||||
@service.set_connection_logging(@lb.id, 'aaa')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -28,7 +28,7 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | connection_throttling', ['rackspac
|
|||
end
|
||||
|
||||
tests('failure') do
|
||||
tests("#set_connection_throttling(#{@lb.id}, -1, -1, -1, -1)").raises(Fog::Rackspace::LoadBalancer::BadRequest) do
|
||||
tests("#set_connection_throttling(#{@lb.id}, -1, -1, -1, -1)").raises(Fog::Rackspace::LoadBalancers::BadRequest) do
|
||||
@service.set_connection_throttling(@lb.id, -1, -1, -1, -1)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | load_balancer_tests', ['rackspace'
|
|||
data
|
||||
end
|
||||
|
||||
tests("#update_load_balancer(#{@lb_id}) while immutable").raises(Fog::Rackspace::LoadBalancer::ServiceError) do
|
||||
tests("#update_load_balancer(#{@lb_id}) while immutable").raises(Fog::Rackspace::LoadBalancers::ServiceError) do
|
||||
@service.update_load_balancer(@lb_id, { :port => 80 }).body
|
||||
end
|
||||
|
||||
|
@ -45,17 +45,17 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | load_balancer_tests', ['rackspace'
|
|||
end
|
||||
|
||||
tests('failure') do
|
||||
tests('#create_load_balancer(invalid name)').raises(Fog::Rackspace::LoadBalancer::BadRequest) do
|
||||
tests('#create_load_balancer(invalid name)').raises(Fog::Rackspace::LoadBalancers::BadRequest) do
|
||||
@service.create_load_balancer('', 'HTTP', 80, [{ :type => 'PUBLIC'}], [{ :address => '10.0.0.1', :port => 80, :condition => 'ENABLED'}])
|
||||
end
|
||||
|
||||
tests('#get_load_balancer(0)').raises(Fog::Rackspace::LoadBalancer::NotFound) do
|
||||
tests('#get_load_balancer(0)').raises(Fog::Rackspace::LoadBalancers::NotFound) do
|
||||
@service.get_load_balancer(0)
|
||||
end
|
||||
tests('#delete_load_balancer(0)').raises(Fog::Rackspace::LoadBalancer::NotFound) do
|
||||
tests('#delete_load_balancer(0)').raises(Fog::Rackspace::LoadBalancers::NotFound) do
|
||||
@service.delete_load_balancer(0)
|
||||
end
|
||||
tests('#update_load_balancer(0)').raises(Fog::Rackspace::LoadBalancer::NotFound) do
|
||||
tests('#update_load_balancer(0)').raises(Fog::Rackspace::LoadBalancers::NotFound) do
|
||||
@service.update_load_balancer(0, { :name => 'newname' })
|
||||
end
|
||||
end
|
||||
|
|
|
@ -33,11 +33,11 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | monitor', ['rackspace']) do
|
|||
end
|
||||
|
||||
tests('failure') do
|
||||
tests("#set_monitor(#{@lb.id}, 'HTP', 5, 5, 5, 5)").raises(Fog::Rackspace::LoadBalancer::BadRequest) do
|
||||
tests("#set_monitor(#{@lb.id}, 'HTP', 5, 5, 5, 5)").raises(Fog::Rackspace::LoadBalancers::BadRequest) do
|
||||
@service.set_monitor(@lb.id, 5, 5, 5, 5)
|
||||
end
|
||||
|
||||
tests("#remove_monitor(#{@lb.id}) => No Monitor").raises(Fog::Rackspace::LoadBalancer::ServiceError) do
|
||||
tests("#remove_monitor(#{@lb.id}) => No Monitor").raises(Fog::Rackspace::LoadBalancers::ServiceError) do
|
||||
@service.remove_monitor(@lb.id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -52,19 +52,19 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | load_balancer_tests', ['rackspace'
|
|||
end
|
||||
|
||||
tests('failure') do
|
||||
tests('create_node(invalid ip)').raises(Fog::Rackspace::LoadBalancer::BadRequest) do
|
||||
tests('create_node(invalid ip)').raises(Fog::Rackspace::LoadBalancers::BadRequest) do
|
||||
@service.create_node(@lb.id, '', 80, 'ENABLED')
|
||||
end
|
||||
tests('create_node(invalid condition)').raises(Fog::Rackspace::LoadBalancer::BadRequest) do
|
||||
tests('create_node(invalid condition)').raises(Fog::Rackspace::LoadBalancers::BadRequest) do
|
||||
@service.create_node(@lb.id, '10.10.10.10', 80, 'EABLED')
|
||||
end
|
||||
tests('get_node(0)').raises(Fog::Rackspace::LoadBalancer::NotFound) do
|
||||
tests('get_node(0)').raises(Fog::Rackspace::LoadBalancers::NotFound) do
|
||||
@service.get_node(@lb.id, 0)
|
||||
end
|
||||
tests('delete_nodes(0)').raises(Fog::Rackspace::LoadBalancer::ServiceError) do
|
||||
tests('delete_nodes(0)').raises(Fog::Rackspace::LoadBalancers::ServiceError) do
|
||||
@service.delete_nodes(@lb.id, 0)
|
||||
end
|
||||
tests('update_node(0)').raises(Fog::Rackspace::LoadBalancer::NotFound) do
|
||||
tests('update_node(0)').raises(Fog::Rackspace::LoadBalancers::NotFound) do
|
||||
@service.update_node(@lb.id, 0, { :weight => 20 })
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | protocol_tests', ['rackspace']) do
|
|||
}
|
||||
]}
|
||||
|
||||
@service = Fog::Rackspace::LoadBalancer.new
|
||||
@service = Fog::Rackspace::LoadBalancers.new
|
||||
|
||||
tests('success') do
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | session_persistence', ['rackspace'
|
|||
end
|
||||
|
||||
tests('failure') do
|
||||
tests("#set_session_persistence(#{@lb.id}, 'aaa')").raises(Fog::Rackspace::LoadBalancer::BadRequest) do
|
||||
tests("#set_session_persistence(#{@lb.id}, 'aaa')").raises(Fog::Rackspace::LoadBalancers::BadRequest) do
|
||||
@service.set_session_persistence(@lb.id, 'aaa')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,10 +21,10 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | virtual_ip_tests', ['rackspace'])
|
|||
|
||||
tests('failure') do
|
||||
#TODO - I feel like this should really be a BadRequest, need to dig in
|
||||
tests('create_virtual_ip(invalid type)').raises(Fog::Rackspace::LoadBalancer::ServiceError) do
|
||||
tests('create_virtual_ip(invalid type)').raises(Fog::Rackspace::LoadBalancers::ServiceError) do
|
||||
@service.create_virtual_ip(@lb.id, 'badtype')
|
||||
end
|
||||
tests('delete_virtual_ip(0)').raises(Fog::Rackspace::LoadBalancer::NotFound) do
|
||||
tests('delete_virtual_ip(0)').raises(Fog::Rackspace::LoadBalancers::NotFound) do
|
||||
@service.delete_virtual_ip(@lb.id, 0)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue