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

[compute|aws] Since this is really proving the use of nil, let's just not pretend there's a value for owner_id.

This commit is contained in:
Dylan Egan 2011-08-23 16:19:49 -07:00
parent 3ac29eb40d
commit c86fe16c5e
2 changed files with 4 additions and 4 deletions

View file

@ -38,7 +38,7 @@ module Fog
# "Server"=>"AmazonEC2"}
#
def authorize_group_and_owner(group, owner)
def authorize_group_and_owner(group, owner = nil)
requires :name
connection.authorize_security_group_ingress(
@ -130,7 +130,7 @@ module Fog
# "Server"=>"AmazonEC2"}
#
def revoke_group_and_owner(group, owner)
def revoke_group_and_owner(group, owner = nil)
requires :name
connection.revoke_security_group_ingress(

View file

@ -15,13 +15,13 @@ Shindo.tests("Fog::Compute[:aws] | security_group", ['aws']) do
@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.authorize_group_and_owner(@other_group.name)
@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.revoke_group_and_owner(@other_group.name)
@group.reload
@group.ip_permissions.empty?
end