1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Move this is Mock.key_id and don't default the path

This commit is contained in:
Edward Muller 2012-02-06 17:51:21 -08:00
parent c276ebdbe6
commit 70337bbc5b
2 changed files with 7 additions and 3 deletions

View file

@ -224,7 +224,12 @@ module Fog
def self.volume_id
"vol-#{Fog::Mock.random_hex(8)}"
end
def self.key_id(length=21)
#Probably close enough
Fog::Mock.random_selection('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',length)
end
def self.rds_address(db_name,region)
"#{db_name}.#{Fog::Mock.random_letters(rand(12) + 4)}.#{region}.rds.amazonaws.com"
end

View file

@ -64,8 +64,7 @@ module Fog
:server_certificates => {},
:users => Hash.new do |uhash, ukey|
uhash[ukey] = {
:user_id => Fog::Mock.random_selection('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', 21),
:path => '/',
:user_id => Fog::AWS::Mock.key_id,
:arn => "arn:aws:iam::#{Fog::AWS::Mock.owner_id}:user/#{ukey}",
:access_keys => [],
:policies => {}