2011-07-21 10:41:40 -04:00
|
|
|
Shindo.tests('Fog::Rackspace::LoadBalancer | connection_logging', ['rackspace']) do
|
|
|
|
|
2011-07-28 14:37:21 -04:00
|
|
|
given_a_load_balancer_service do
|
|
|
|
given_a_load_balancer do
|
|
|
|
tests('success') do
|
|
|
|
tests("#get_connection_logging(#{@lb.id})").formats(CONNECTION_LOGGING_FORMAT) do
|
|
|
|
@service.get_connection_logging(@lb.id).body
|
|
|
|
end
|
2011-07-21 10:41:40 -04:00
|
|
|
|
2011-07-28 14:37:21 -04:00
|
|
|
@lb.wait_for { ready? }
|
|
|
|
tests("#set_connection_logging(#{@lb.id}, true)").succeeds do
|
|
|
|
@service.set_connection_logging(@lb.id, true)
|
|
|
|
end
|
|
|
|
end
|
2011-07-21 10:41:40 -04:00
|
|
|
|
2011-07-28 14:37:21 -04:00
|
|
|
tests('failure') do
|
|
|
|
tests("#set_connection_logging(#{@lb.id}, 'aaa')").raises(Fog::Rackspace::LoadBalancer::InternalServerError) do
|
|
|
|
@service.set_connection_logging(@lb.id, 'aaa')
|
|
|
|
end
|
|
|
|
end
|
2011-07-21 10:41:40 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|