Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated componenttest.NewNop*CreateSettings #6761

Merged
merged 1 commit into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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