Skip to content

Commit

Permalink
[chore] fix import orders in mdatagen templates (#10081)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu committed May 6, 2024
1 parent b7b7e51 commit 8aaec09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cmd/mdatagen/templates/component_test.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"go.opentelemetry.io/collector/component"
{{- end }}
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/confmap/confmaptest"
{{- if not (and .Tests.SkipLifecycle .Tests.SkipShutdown) }}
{{- if isExporter }}
"go.opentelemetry.io/collector/exporter"
Expand All @@ -39,11 +40,11 @@ import (
"go.opentelemetry.io/collector/extension/extensiontest"
{{- end }}
{{- if isConnector }}
"go.opentelemetry.io/collector/consumer/consumertest"
"go.opentelemetry.io/collector/connector"
"go.opentelemetry.io/collector/connector/connectortest"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/consumer/consumertest"
{{- end }}
"go.opentelemetry.io/collector/confmap/confmaptest"
{{- if or isExporter isProcessor }}
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/plog"
Expand Down
4 changes: 3 additions & 1 deletion cmd/mdatagen/templates/package_test.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ package {{ .Package }}
import (
"testing"

"go.uber.org/goleak"
{{- if not .Tests.GoLeak.Skip }}
"go.uber.org/goleak"
{{- end }}
)

func TestMain(m *testing.M) {
Expand Down

0 comments on commit 8aaec09

Please sign in to comment.