mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[rackspace|identity] fixing broken identity tests
This commit is contained in:
parent
ac2d666561
commit
3b760d6838
2 changed files with 6 additions and 3 deletions
|
@ -18,7 +18,7 @@ module Fog
|
||||||
new(data)
|
new(data)
|
||||||
rescue Excon::Errors::NotFound
|
rescue Excon::Errors::NotFound
|
||||||
nil
|
nil
|
||||||
rescue Excon::Errors::NotAuthorized
|
rescue Excon::Errors::Unauthorized
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ module Fog
|
||||||
new(data)
|
new(data)
|
||||||
rescue Excon::Errors::NotFound
|
rescue Excon::Errors::NotFound
|
||||||
nil
|
nil
|
||||||
rescue Excon::Errors::NotAuthorized
|
rescue Excon::Errors::Unauthorized
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -41,7 +41,7 @@ Shindo.tests('Fog::Rackspace::Identity | users', ['rackspace']) do
|
||||||
|
|
||||||
service = Fog::Rackspace::Identity.new
|
service = Fog::Rackspace::Identity.new
|
||||||
id = nil
|
id = nil
|
||||||
username = 'foguser'
|
username = "fog#{Time.now.to_i.to_s}"
|
||||||
email = 'fog_user@example.com'
|
email = 'fog_user@example.com'
|
||||||
enabled = true
|
enabled = true
|
||||||
password = 'Fog_password1'
|
password = 'Fog_password1'
|
||||||
|
@ -57,6 +57,9 @@ Shindo.tests('Fog::Rackspace::Identity | users', ['rackspace']) do
|
||||||
service.delete_user(id)
|
service.delete_user(id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# there appears to be a werid caching issue. It's just easier to create a new username and continue on
|
||||||
|
username = "fog#{Time.now.to_i.to_s}"
|
||||||
|
|
||||||
tests('#create_user with password').succeeds do
|
tests('#create_user with password').succeeds do
|
||||||
data = service.create_user(username, email, enabled, :password => password ).body
|
data = service.create_user(username, email, enabled, :password => password ).body
|
||||||
id = data['user']['id']
|
id = data['user']['id']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue