mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[digitalocean|compute] added create_ssh_key mock code
This commit is contained in:
parent
dba2408eda
commit
26ae294683
1 changed files with 13 additions and 1 deletions
|
@ -17,7 +17,19 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def create_ssh_key( name, pub_key )
|
||||
Fog::Mock.not_implemented
|
||||
response = Excon::Response.new
|
||||
response.status = 200
|
||||
mock_data = {
|
||||
"id" => Fog::Mock.random_numbers(1).to_i,
|
||||
"name" => name,
|
||||
"ssh_pub_key" => pub_key
|
||||
}
|
||||
response.body = {
|
||||
"status" => "OK",
|
||||
"ssh_key" => mock_data
|
||||
}
|
||||
self.data[:ssh_keys] << mock_data
|
||||
response
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue