lib/fog/oraclecloud/requests/compute/delete_instance.rb in fog-oraclecloud-0.1.1 vs lib/fog/oraclecloud/requests/compute/delete_instance.rb in fog-oraclecloud-0.1.2

- old
+ new

@@ -15,8 +15,19 @@ 'Content-Type' => 'application/oracle-compute-v3+json' } ) end end + + class Mock + def delete_instance(name) + response = Excon::Response.new + clean_name = name.sub "/Compute-#{@identity_domain}/#{@username}/", '' + self.data[:instances][clean_name]['state'] = 'stopping' + self.data[:deleted_at][clean_name] = Time.now + response.status = 204 + response + end + end end end end