Fix formatting of aws_test.go

This commit is contained in:
James Ravn 2016-01-26 15:13:25 +00:00
parent b4bbc3b3ef
commit c3383b3422

View File

@ -801,27 +801,26 @@ func TestSubnetIDsinVPC(t *testing.T) {
} }
func TestIpPermissionExistsHandlesMultipleGroupIds(t *testing.T) { func TestIpPermissionExistsHandlesMultipleGroupIds(t *testing.T) {
oldIpPermission := ec2.IpPermission { oldIpPermission := ec2.IpPermission{
UserIdGroupPairs: []*ec2.UserIdGroupPair { UserIdGroupPairs: []*ec2.UserIdGroupPair{
&ec2.UserIdGroupPair{GroupId: aws.String("firstGroupId")}, {GroupId: aws.String("firstGroupId")},
&ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId")}, {GroupId: aws.String("secondGroupId")},
&ec2.UserIdGroupPair{GroupId: aws.String("thirdGroupId")}, {GroupId: aws.String("thirdGroupId")},
}, },
} }
existingIpPermission := ec2.IpPermission { existingIpPermission := ec2.IpPermission{
UserIdGroupPairs: []*ec2.UserIdGroupPair { UserIdGroupPairs: []*ec2.UserIdGroupPair{
&ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId")}, {GroupId: aws.String("secondGroupId")},
}, },
} }
newIpPermission := ec2.IpPermission { newIpPermission := ec2.IpPermission{
UserIdGroupPairs: []*ec2.UserIdGroupPair { UserIdGroupPairs: []*ec2.UserIdGroupPair{
&ec2.UserIdGroupPair{GroupId: aws.String("fourthGroupId")}, {GroupId: aws.String("fourthGroupId")},
}, },
} }
equals := ipPermissionExists(&existingIpPermission, &oldIpPermission, false) equals := ipPermissionExists(&existingIpPermission, &oldIpPermission, false)
if !equals { if !equals {
t.Errorf("Should have been considered equal since first is in the second array of groups") t.Errorf("Should have been considered equal since first is in the second array of groups")
@ -834,27 +833,26 @@ func TestIpPermissionExistsHandlesMultipleGroupIds(t *testing.T) {
} }
func TestIpPermissionExistsHandlesMultipleGroupIdsWithUserIds(t *testing.T) { func TestIpPermissionExistsHandlesMultipleGroupIdsWithUserIds(t *testing.T) {
oldIpPermission := ec2.IpPermission { oldIpPermission := ec2.IpPermission{
UserIdGroupPairs: []*ec2.UserIdGroupPair { UserIdGroupPairs: []*ec2.UserIdGroupPair{
&ec2.UserIdGroupPair{GroupId: aws.String("firstGroupId"), UserId: aws.String("firstUserId")}, {GroupId: aws.String("firstGroupId"), UserId: aws.String("firstUserId")},
&ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId"), UserId: aws.String("secondUserId")}, {GroupId: aws.String("secondGroupId"), UserId: aws.String("secondUserId")},
&ec2.UserIdGroupPair{GroupId: aws.String("thirdGroupId"), UserId: aws.String("thirdUserId")}, {GroupId: aws.String("thirdGroupId"), UserId: aws.String("thirdUserId")},
}, },
} }
existingIpPermission := ec2.IpPermission { existingIpPermission := ec2.IpPermission{
UserIdGroupPairs: []*ec2.UserIdGroupPair { UserIdGroupPairs: []*ec2.UserIdGroupPair{
&ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId"), UserId: aws.String("secondUserId")}, {GroupId: aws.String("secondGroupId"), UserId: aws.String("secondUserId")},
}, },
} }
newIpPermission := ec2.IpPermission { newIpPermission := ec2.IpPermission{
UserIdGroupPairs: []*ec2.UserIdGroupPair { UserIdGroupPairs: []*ec2.UserIdGroupPair{
&ec2.UserIdGroupPair{GroupId: aws.String("secondGroupId"), UserId: aws.String("anotherUserId")}, {GroupId: aws.String("secondGroupId"), UserId: aws.String("anotherUserId")},
}, },
} }
equals := ipPermissionExists(&existingIpPermission, &oldIpPermission, true) equals := ipPermissionExists(&existingIpPermission, &oldIpPermission, true)
if !equals { if !equals {
t.Errorf("Should have been considered equal since first is in the second array of groups") t.Errorf("Should have been considered equal since first is in the second array of groups")