mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
4d33ccb7a7
- Focus on adding additional vm actions support - New request types are not fully tested
19 lines
656 B
Ruby
19 lines
656 B
Ruby
Shindo.tests("Fog::Identity[:openstack] | roles", ['openstack']) do
|
|
@tenant = Fog::Identity[:openstack].tenants.create(:name => 'test_user')
|
|
@user = Fog::Identity[:openstack].users.create(:name => 'test_user', :tenant_id => @tenant.id, :password => 'spoof')
|
|
@role = Fog::Identity[:openstack].roles(:user => @user, :tenant => @tenant).create(:name => 'test_role')
|
|
@roles = Fog::Identity[:openstack].roles(:user => @user, :tenant => @tenant)
|
|
|
|
tests('success') do
|
|
tests('#all').succeeds do
|
|
@roles.all
|
|
end
|
|
|
|
tests('#get').succeeds do
|
|
@roles.get @roles.first.id
|
|
end
|
|
end
|
|
|
|
@user.destroy
|
|
@tenant.destroy
|
|
end
|