Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zhihonl committed Dec 4, 2024
1 parent eae7f2e commit 5b93fab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions extension/entitystore/ec2Info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func TestNoASGRetrievalInKubernetesMode(t *testing.T) {
name string
args args
wantErr bool
want EC2Info
want string
}{
{
name: "EKSNoASGFromEC2Info",
Expand All @@ -256,9 +256,7 @@ func TestNoASGRetrievalInKubernetesMode(t *testing.T) {
kubernetesMode: config.ModeEKS,
},
wantErr: false,
want: EC2Info{
AutoScalingGroup: "",
},
want: "",
},
}
for _, tt := range tests {
Expand All @@ -267,7 +265,7 @@ func TestNoASGRetrievalInKubernetesMode(t *testing.T) {
ei := &EC2Info{metadataProvider: tt.args.metadataProvider, kubernetesMode: tt.args.kubernetesMode, logger: logger}
go ei.initEc2Info()
time.Sleep(3 * time.Second)
assert.Equal(t, tt.want.AutoScalingGroup, ei.GetAutoScalingGroup())
assert.Equal(t, tt.want, ei.GetAutoScalingGroup())
})
}
}
8 changes: 3 additions & 5 deletions extension/entitystore/extension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (

type mockServiceProvider struct {
mock.Mock
started bool
}

// This helper function creates a test logger
Expand Down Expand Up @@ -629,9 +628,8 @@ func TestEntityStore_LogMessageDoesNotIncludeResourceInfo(t *testing.T) {

func TestEntityStore_ServiceProviderInDifferentEnv(t *testing.T) {
type args struct {
metadataProvider ec2metadataprovider.MetadataProvider
mode string
kubernetesMode string
mode string
kubernetesMode string
}
tests := []struct {
name string
Expand Down Expand Up @@ -663,7 +661,7 @@ func TestEntityStore_ServiceProviderInDifferentEnv(t *testing.T) {
logger: zap.NewNop(),
config: esConfig,
}
e.Start(nil, nil)
e.Start(context.TODO(), nil)
time.Sleep(3 * time.Second)

name, source := e.serviceprovider.getServiceNameAndSource()
Expand Down

0 comments on commit 5b93fab

Please sign in to comment.