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

[rackspace] fixing broken tests

This commit is contained in:
Kyle Rames 2013-08-15 13:09:06 -05:00
parent 53bab93b71
commit 5c0743bfa8
3 changed files with 21 additions and 5 deletions

View file

@ -6,6 +6,10 @@ module Fog
class Rackspace < Fog::Service
include Fog::Rackspace::Errors
class ServiceError < Fog::Rackspace::Errors::ServiceError; end
class InternalServerError < Fog::Rackspace::Errors::InternalServerError; end
class BadRequest < Fog::Rackspace::Errors::BadRequest; end
requires :rackspace_api_key, :rackspace_username
recognizes :rackspace_auth_url, :rackspace_servicenet, :persistent
recognizes :rackspace_auth_token, :rackspace_management_url, :rackspace_compute_v1_url, :rackspace_region

View file

@ -106,7 +106,11 @@ Shindo.tests('Fog::Compute::RackspaceV2 | server_tests', ['rackspace']) do
sleep 120 unless Fog.mocking?
tests('#resize_server').succeeds do
resize_flavor_id = flavor_id
if Fog.mocking?
resize_flavor_id = flavor_id
else
resize_flavor_id = service.flavors[1]
end
service.resize_server(server_id, resize_flavor_id)
end
wait_for_server_state(service, server_id, 'VERIFY_RESIZE', 'ACTIVE')

View file

@ -304,12 +304,20 @@ Shindo.tests('Fog::Storage[:rackspace] | large object requests', ['rackspace'])
end
end
tests('#delete_static_large_object with missing container').raises(Fog::Storage::Rackspace::NotFound) do
Fog::Storage[:rackspace].delete_static_large_object('fognoncontainer', 'fog_large_object')
tests('#delete_static_large_object with missing container') do
response = Fog::Storage[:rackspace].delete_static_large_object('fognoncontainer', 'fog_large_object')
returns(200) { response.status }
returns(0) { response.body["Number Not Found"] }
returns("400 Bad Request") { response.body["Response Status"]}
returns("Invalid bulk delete.") { response.body["Response Body"]}
end
tests('#delete_static_large_object with missing manifest').raises(Fog::Storage::Rackspace::NotFound) do
Fog::Storage[:rackspace].delete_static_large_object(@directory.identity, 'fog_non_object')
tests('#delete_static_large_object with missing manifest') do
response = Fog::Storage[:rackspace].delete_static_large_object(@directory.identity, 'fog_non_object')
returns(200) { response.status }
returns(0) { response.body["Number Not Found"] }
returns("400 Bad Request") { response.body["Response Status"]}
returns("Invalid bulk delete.") { response.body["Response Body"]}
end
tests('#delete_static_large_object with missing segment') do