parent
df8bd43a45
commit
0f32f3c50c
3 changed files with 150 additions and 20 deletions
|
|
@ -714,15 +714,10 @@ def test_description_in_ip_permissions():
|
|||
)
|
||||
|
||||
result = conn.describe_security_groups(GroupIds=[sg["GroupId"]])
|
||||
group = result["SecurityGroups"][0]
|
||||
|
||||
assert (
|
||||
result["SecurityGroups"][0]["IpPermissions"][0]["IpRanges"][0]["Description"]
|
||||
== "testDescription"
|
||||
)
|
||||
assert (
|
||||
result["SecurityGroups"][0]["IpPermissions"][0]["IpRanges"][0]["CidrIp"]
|
||||
== "1.2.3.4/32"
|
||||
)
|
||||
assert group["IpPermissions"][0]["IpRanges"][0]["Description"] == "testDescription"
|
||||
assert group["IpPermissions"][0]["IpRanges"][0]["CidrIp"] == "1.2.3.4/32"
|
||||
|
||||
sg = conn.create_security_group(
|
||||
GroupName="sg2", Description="Test security group sg1", VpcId=vpc.id
|
||||
|
|
@ -741,17 +736,10 @@ def test_description_in_ip_permissions():
|
|||
)
|
||||
|
||||
result = conn.describe_security_groups(GroupIds=[sg["GroupId"]])
|
||||
group = result["SecurityGroups"][0]
|
||||
|
||||
assert (
|
||||
result["SecurityGroups"][0]["IpPermissions"][0]["IpRanges"][0].get(
|
||||
"Description"
|
||||
)
|
||||
is None
|
||||
)
|
||||
assert (
|
||||
result["SecurityGroups"][0]["IpPermissions"][0]["IpRanges"][0]["CidrIp"]
|
||||
== "1.2.3.4/32"
|
||||
)
|
||||
assert group["IpPermissions"][0]["IpRanges"][0].get("Description") is None
|
||||
assert group["IpPermissions"][0]["IpRanges"][0]["CidrIp"] == "1.2.3.4/32"
|
||||
|
||||
|
||||
@mock_ec2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue