Skip to content

Commit

Permalink
Clean up awsmock
Browse files Browse the repository at this point in the history
  • Loading branch information
hierynomus committed Feb 15, 2022
1 parent 11c1137 commit 86a4811
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 96 deletions.
2 changes: 0 additions & 2 deletions cloudmock/aws/mockec2/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions cloudmock/aws/mockec2/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ type MockEC2 struct {

Volumes map[string]*ec2.Volume

PrefixLists map[string]*ec2.ManagedPrefixList

KeyPairs map[string]*ec2.KeyPairInfo

Tags []*ec2.TagDescription
Expand Down Expand Up @@ -112,9 +110,6 @@ func (m *MockEC2) All() map[string]interface{} {
for id, o := range m.NatGateways {
all[id] = o
}
for id, o := range m.PrefixLists {
all[id] = o
}

return all
}
Expand Down
76 changes: 0 additions & 76 deletions cloudmock/aws/mockec2/prefixlists.go

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/model/awsmodel/api_loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ func (b *APILoadBalancerBuilder) Build(c *fi.ModelBuilderContext) error {
}
t.SetCidrOrPrefix(cidr)
c.AddTask(t)
} else if utils.IsIPv4CIDR(cidr) {
} else {
t := &awstasks.SecurityGroupRule{
Name: fi.String("icmp-pmtu-api-elb-" + cidr),
Lifecycle: b.SecurityLifecycle,
Expand Down
12 changes: 0 additions & 12 deletions pkg/testutils/integrationtestharness.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,18 +268,6 @@ func (h *IntegrationTestHarness) SetupMockAWS() *awsup.MockAWSCloud {
AllocationId: aws.String("eipalloc-b2345678"),
}, "nat-b2345678")

mockEC2.CreateManagedPrefixListWithId(&ec2.CreateManagedPrefixListInput{
AddressFamily: aws.String("ipv4"),
PrefixListName: aws.String("test-ipv4-prefix-list"),
MaxEntries: aws.Int64(10),
}, "pl-44444444")

mockEC2.CreateManagedPrefixListWithId(&ec2.CreateManagedPrefixListInput{
AddressFamily: aws.String("ipv6"),
PrefixListName: aws.String("test-ipv6-prefix-list"),
MaxEntries: aws.Int64(10),
}, "pl-66666666")

mockELBV2.CreateTargetGroup(&elbv2.CreateTargetGroupInput{
Name: aws.String("my-external-tg-1"),
})
Expand Down

0 comments on commit 86a4811

Please sign in to comment.