mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[digitalocean|compute] added get_server_details mock code
This commit is contained in:
parent
9fbf1e8e13
commit
9dbdc392d5
1 changed files with 11 additions and 1 deletions
|
@ -16,7 +16,17 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_server_details(server_id)
|
||||
Fog::Mock.not_implemented
|
||||
response = Excon::Response.new
|
||||
response.status = 200
|
||||
|
||||
server = self.data[:servers].find { |s| s['id'] == server_id }
|
||||
|
||||
response.body = {
|
||||
"status" => "OK",
|
||||
"droplet" => self.data[:servers].find { |s| s['id'] == server_id }
|
||||
}
|
||||
|
||||
response
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue