Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Kaplan committed Oct 12, 2023
1 parent 840441f commit 40dc546
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/aws/services/vpclattice.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type defaultLatticeServiceNameProvider struct {
name string
}

func NewLatticeServiceNameProvider(name string) LatticeServiceNameProvider {
func NewDefaultLatticeServiceNameProvider(name string) *defaultLatticeServiceNameProvider {
return &defaultLatticeServiceNameProvider{
name: name,
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/deploy/lattice/access_log_subscription_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (m *defaultAccessLogSubscriptionManager) Create(
}
resourceIdentifier = *serviceNetwork.SvcNetwork.Arn
case lattice.ServiceSourceType:
serviceNameProvider := services.NewLatticeServiceNameProvider(accessLogSubscription.Spec.SourceName)
serviceNameProvider := services.NewDefaultLatticeServiceNameProvider(accessLogSubscription.Spec.SourceName)
service, err := vpcLatticeSess.FindService(ctx, serviceNameProvider)
if err != nil {
return nil, err
Expand Down
6 changes: 3 additions & 3 deletions pkg/deploy/lattice/access_log_subscription_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func Test_Create_NewAccessLogSubscriptionForService_ReturnsSuccess(t *testing.T)
IsDeleted: false,
},
}
serviceNameProvider := services.NewLatticeServiceNameProvider(sourceName)
serviceNameProvider := services.NewDefaultLatticeServiceNameProvider(sourceName)
findServiceOutput := &vpclattice.ServiceSummary{
Arn: aws.String(serviceArn),
Name: aws.String(sourceName),
Expand Down Expand Up @@ -160,7 +160,7 @@ func Test_Create_NewAccessLogSubscriptionForDeletedService_ReturnsNotFoundError(
IsDeleted: false,
},
}
serviceNameProvider := services.NewLatticeServiceNameProvider(sourceName)
serviceNameProvider := services.NewDefaultLatticeServiceNameProvider(sourceName)
findServiceOutput := &vpclattice.ServiceSummary{
Arn: aws.String(serviceArn),
Name: aws.String(sourceName),
Expand Down Expand Up @@ -380,7 +380,7 @@ func Test_Create_NewAccessLogSubscriptionForMissingService_ReturnsNotFoundError(
},
}
notFoundErr := services.NewNotFoundError("", "")
serviceNameProvider := services.NewLatticeServiceNameProvider(sourceName)
serviceNameProvider := services.NewDefaultLatticeServiceNameProvider(sourceName)

mockLattice.EXPECT().FindService(ctx, serviceNameProvider).Return(nil, notFoundErr)
mockCloud.EXPECT().Lattice().Return(mockLattice).AnyTimes()
Expand Down

0 comments on commit 40dc546

Please sign in to comment.