diff --git a/lib/fog/rackspace/compute_v2.rb b/lib/fog/rackspace/compute_v2.rb index 7ddc84d46..1c6891979 100644 --- a/lib/fog/rackspace/compute_v2.rb +++ b/lib/fog/rackspace/compute_v2.rb @@ -54,9 +54,15 @@ module Fog request :delete_attachment class Mock + + def initialize(options) + # prevents service initialization errors. This method should be implemented + end + def request(params) Fog::Mock.not_implemented end + end class Real diff --git a/lib/fog/rackspace/requests/compute_v2/delete_image.rb b/lib/fog/rackspace/requests/compute_v2/delete_image.rb index 7ee9ab035..2fe84c9dd 100644 --- a/lib/fog/rackspace/requests/compute_v2/delete_image.rb +++ b/lib/fog/rackspace/requests/compute_v2/delete_image.rb @@ -17,6 +17,15 @@ module Fog end end + + class Mock + def delete_image(image_id) + response = Excon::Response.new + response.status = 202 + response.body = "" + end + + end end end end