mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Add some mocking helper methods.
This commit is contained in:
parent
099a963fd3
commit
a28193d2b8
1 changed files with 17 additions and 0 deletions
|
@ -44,6 +44,23 @@ module Fog
|
|||
Fog::Mock.random_hex(32)
|
||||
end
|
||||
|
||||
def self.key_fingerprint
|
||||
fingerprint = []
|
||||
20.times do
|
||||
fingerprint << Fog::Mock.random_hex(2)
|
||||
end
|
||||
fingerprint.join(':')
|
||||
end
|
||||
|
||||
def self.key_material
|
||||
private_key = OpenSSL::PKey::RSA.generate(1024)
|
||||
public_key = private_key.public_key
|
||||
return private_key.to_s, public_key.to_s
|
||||
end
|
||||
|
||||
def self.user_id
|
||||
"dev_" + Fog::Mock.random_numbers(14)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue