Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mwear committed Oct 4, 2024
1 parent 59b51c2 commit 84944b7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
2 changes: 0 additions & 2 deletions exporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ require (

replace go.opentelemetry.io/collector/component => ../component

replace go.opentelemetry.io/collector/component/componentstatus => ../component/componentstatus

replace go.opentelemetry.io/collector/consumer => ../consumer

replace go.opentelemetry.io/collector/extension => ../extension
Expand Down
6 changes: 3 additions & 3 deletions exporter/otlpexporter/otlp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ func TestComponentStatus(t *testing.T) {
exp, err := factory.CreateTracesExporter(context.Background(), set, cfg)
require.NoError(t, err)
require.NotNil(t, exp)
assert.NoError(t, exp.Start(context.Background(), host))
require.NoError(t, exp.Start(context.Background(), host))

defer func() {
assert.NoError(t, exp.Shutdown(context.Background()))
Expand Down Expand Up @@ -897,7 +897,7 @@ func TestComponentStatus(t *testing.T) {
exp, err := factory.CreateMetricsExporter(context.Background(), set, cfg)
require.NoError(t, err)
require.NotNil(t, exp)
assert.NoError(t, exp.Start(context.Background(), host))
require.NoError(t, exp.Start(context.Background(), host))

defer func() {
assert.NoError(t, exp.Shutdown(context.Background()))
Expand Down Expand Up @@ -937,7 +937,7 @@ func TestComponentStatus(t *testing.T) {
exp, err := factory.CreateLogsExporter(context.Background(), set, cfg)
require.NoError(t, err)
require.NotNil(t, exp)
assert.NoError(t, exp.Start(context.Background(), host))
require.NoError(t, exp.Start(context.Background(), host))

defer func() {
assert.NoError(t, exp.Shutdown(context.Background()))
Expand Down
2 changes: 0 additions & 2 deletions exporter/otlphttpexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ replace go.opentelemetry.io/collector => ../../

replace go.opentelemetry.io/collector/component => ../../component

replace go.opentelemetry.io/collector/component/componentstatus => ../../component/componentstatus

replace go.opentelemetry.io/collector/config/configauth => ../../config/configauth

replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression
Expand Down
12 changes: 6 additions & 6 deletions exporter/otlphttpexporter/otlp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ func TestComponentStatus(t *testing.T) {
t.Run("traces", func(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
srv := createBackend("/v1/traces", func(writer http.ResponseWriter, request *http.Request) {
srv := createBackend("/v1/traces", func(writer http.ResponseWriter, _ *http.Request) {
writer.WriteHeader(tt.responseStatus)
})
defer srv.Close()
Expand All @@ -1082,7 +1082,7 @@ func TestComponentStatus(t *testing.T) {
traces := ptrace.NewTraces()
err = exp.ConsumeTraces(context.Background(), traces)
if tt.componentStatus != componentstatus.StatusOK {
assert.Error(t, err)
require.Error(t, err)
}
assert.Equal(t, tt.componentStatus, host.lastStatus)
})
Expand All @@ -1092,7 +1092,7 @@ func TestComponentStatus(t *testing.T) {
t.Run("metrics", func(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
srv := createBackend("/v1/metrics", func(writer http.ResponseWriter, request *http.Request) {
srv := createBackend("/v1/metrics", func(writer http.ResponseWriter, _ *http.Request) {
writer.WriteHeader(tt.responseStatus)
})
defer srv.Close()
Expand All @@ -1119,7 +1119,7 @@ func TestComponentStatus(t *testing.T) {
metrics := pmetric.NewMetrics()
err = exp.ConsumeMetrics(context.Background(), metrics)
if tt.componentStatus != componentstatus.StatusOK {
assert.Error(t, err)
require.Error(t, err)
}
assert.Equal(t, tt.componentStatus, host.lastStatus)
})
Expand All @@ -1129,7 +1129,7 @@ func TestComponentStatus(t *testing.T) {
t.Run("logs", func(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
srv := createBackend("/v1/logs", func(writer http.ResponseWriter, request *http.Request) {
srv := createBackend("/v1/logs", func(writer http.ResponseWriter, _ *http.Request) {
writer.WriteHeader(tt.responseStatus)
})
defer srv.Close()
Expand All @@ -1156,7 +1156,7 @@ func TestComponentStatus(t *testing.T) {
logs := plog.NewLogs()
err = exp.ConsumeLogs(context.Background(), logs)
if tt.componentStatus != componentstatus.StatusOK {
assert.Error(t, err)
require.Error(t, err)
}
assert.Equal(t, tt.componentStatus, host.lastStatus)
})
Expand Down

0 comments on commit 84944b7

Please sign in to comment.