Skip to content

Commit

Permalink
Remove deprecated componenttest.NewNop*CreateSettings (#6761)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <[email protected]>

Signed-off-by: Bogdan Drutu <[email protected]>
  • Loading branch information
bogdandrutu authored Dec 13, 2022
1 parent 33477c6 commit 42c7b20
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 28 deletions.
11 changes: 11 additions & 0 deletions .chloggen/rmdepnopset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: componenttest

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove deprecated componenttest.NewNop*CreateSettings

# One or more tracking issues or pull requests related to the change
issues: [6761]
8 changes: 0 additions & 8 deletions component/componenttest/nop_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ import (
"go.opentelemetry.io/collector/exporter"
)

// Deprecated: [v0.67.0] use exportertest.NewNopCreateSettings.
func NewNopExporterCreateSettings() exporter.CreateSettings {
return exporter.CreateSettings{
TelemetrySettings: NewNopTelemetrySettings(),
BuildInfo: component.NewDefaultBuildInfo(),
}
}

// Deprecated: [v0.67.0] use exportertest.NewNopFactory.
func NewNopExporterFactory() exporter.Factory {
return exporter.NewFactory(
Expand Down
8 changes: 0 additions & 8 deletions component/componenttest/nop_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ import (
"go.opentelemetry.io/collector/extension"
)

// Deprecated: [v0.67.0] use extensiontest.NewNopCreateSettings.
func NewNopExtensionCreateSettings() extension.CreateSettings {
return extension.CreateSettings{
TelemetrySettings: NewNopTelemetrySettings(),
BuildInfo: component.NewDefaultBuildInfo(),
}
}

// Deprecated: [v0.67.0] use extensiontest.NewNopFactory.
func NewNopExtensionFactory() extension.Factory {
return extension.NewFactory(
Expand Down
8 changes: 0 additions & 8 deletions component/componenttest/nop_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ import (
"go.opentelemetry.io/collector/receiver"
)

// Deprecated: [v0.67.0] use receivertest.NewNopCreateSettings.
func NewNopReceiverCreateSettings() receiver.CreateSettings {
return receiver.CreateSettings{
TelemetrySettings: NewNopTelemetrySettings(),
BuildInfo: component.NewDefaultBuildInfo(),
}
}

// Deprecated: [v0.67.0] use receivertest.NewNopFactory
func NewNopReceiverFactory() receiver.Factory {
return receiver.NewFactory(
Expand Down
9 changes: 8 additions & 1 deletion exporter/exportertest/nop_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@
package exportertest // import "go.opentelemetry.io/collector/exporter/exportertest"

import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/exporter"
)

// NewNopCreateSettings returns a new nop settings for Create*Exporter functions.
var NewNopCreateSettings = componenttest.NewNopExporterCreateSettings //nolint:staticcheck
func NewNopCreateSettings() exporter.CreateSettings {
return exporter.CreateSettings{
TelemetrySettings: componenttest.NewNopTelemetrySettings(),
BuildInfo: component.NewDefaultBuildInfo(),
}
}

// NewNopFactory returns an exporter.Factory that constructs nop exporters.
var NewNopFactory = componenttest.NewNopExporterFactory //nolint:staticcheck
9 changes: 8 additions & 1 deletion extension/extensiontest/nop_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@
package extensiontest // import "go.opentelemetry.io/collector/extension/extensiontest"

import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/extension"
)

// NewNopCreateSettings returns a new nop settings for extension.Factory Create* functions.
var NewNopCreateSettings = componenttest.NewNopExtensionCreateSettings //nolint:staticcheck
func NewNopCreateSettings() extension.CreateSettings {
return extension.CreateSettings{
TelemetrySettings: componenttest.NewNopTelemetrySettings(),
BuildInfo: component.NewDefaultBuildInfo(),
}
}

// NewNopFactory returns an extension.Factory that constructs nop extensions.
var NewNopFactory = componenttest.NewNopExtensionFactory //nolint:staticcheck
13 changes: 11 additions & 2 deletions receiver/receivertest/nop_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,19 @@

package receivertest // import "go.opentelemetry.io/collector/receiver/receivertest"

import "go.opentelemetry.io/collector/component/componenttest"
import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/receiver"
)

// NewNopCreateSettings returns a new nop settings for Create* functions.
var NewNopCreateSettings = componenttest.NewNopReceiverCreateSettings //nolint:staticcheck
func NewNopCreateSettings() receiver.CreateSettings {
return receiver.CreateSettings{
TelemetrySettings: componenttest.NewNopTelemetrySettings(),
BuildInfo: component.NewDefaultBuildInfo(),
}
}

// NewNopFactory returns a receiver.Factory that constructs nop receivers.
var NewNopFactory = componenttest.NewNopReceiverFactory //nolint:staticcheck

0 comments on commit 42c7b20

Please sign in to comment.