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

[compute|aws] Simple test to verify revoke_group_and_owner behaviour.

This commit is contained in:
Dylan Egan 2011-08-23 11:47:30 -07:00
parent fd708c6a70
commit 7829bb73aa

View file

@ -12,6 +12,21 @@ Shindo.tests("Fog::Compute[:aws] | security_group", ['aws']) do
@group.description == " fog group desc "
end
@other_group = Fog::Compute[:aws].security_groups.create(:name => 'other group', :description => 'another group')
test("authorize access by another security group") do
@group.authorize_group_and_owner(@other_group.name, @other_group.owner_id)
@group.reload
@group.ip_permissions.size == 3
end
test("revoke access from another security group") do
@group.revoke_group_and_owner(@other_group.name, @other_group.owner_id)
@group.reload
@group.ip_permissions.size == 0
end
@other_group.destroy
@group.destroy
end
end