Skip to content

Commit

Permalink
[chore] Move from string(factory.Type()) to factory.Type.String() (#3…
Browse files Browse the repository at this point in the history
…1075)

**Description:**

Another PR needed for open-telemetry/opentelemetry-collector/pull/9472
  • Loading branch information
mx-psi authored Feb 6, 2024
1 parent 1d62bdd commit 75f81c4
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion exporter/sapmexporter/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestCreateDefaultConfig(t *testing.T) {

func TestCreateExporter(t *testing.T) {
factory := NewFactory()
assert.Equal(t, "sapm", string(factory.Type()))
assert.Equal(t, "sapm", factory.Type().String())

cfg := factory.CreateDefaultConfig()
eCfg := cfg.(*Config)
Expand Down
2 changes: 1 addition & 1 deletion receiver/aerospikereceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

func TestNewFactory(t *testing.T) {
factory := aerospikereceiver.NewFactory()
require.Equal(t, "aerospike", string(factory.Type()))
require.Equal(t, "aerospike", factory.Type().String())
cfg := factory.CreateDefaultConfig().(*aerospikereceiver.Config)
require.Equal(t, time.Minute, cfg.CollectionInterval)
require.False(t, cfg.CollectClusterMetrics)
Expand Down
2 changes: 1 addition & 1 deletion receiver/dockerstatsreceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

func TestCreateDefaultConfig(t *testing.T) {
factory := NewFactory()
assert.Equal(t, "docker_stats", string(factory.Type()))
assert.Equal(t, "docker_stats", factory.Type().String())

config := factory.CreateDefaultConfig()
assert.NotNil(t, config, "failed to create default config")
Expand Down
2 changes: 1 addition & 1 deletion receiver/jaegerreceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
func TestTypeStr(t *testing.T) {
factory := NewFactory()

assert.Equal(t, "jaeger", string(factory.Type()))
assert.Equal(t, "jaeger", factory.Type().String())
}

func TestCreateDefaultConfig(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion receiver/podmanreceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

func TestCreateDefaultConfig(t *testing.T) {
factory := NewFactory()
assert.Equal(t, "podman_stats", string(factory.Type()))
assert.Equal(t, "podman_stats", factory.Type().String())

config := factory.CreateDefaultConfig()
assert.NotNil(t, config, "failed to create default config")
Expand Down
2 changes: 1 addition & 1 deletion receiver/purefareceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
func TestTypeStr(t *testing.T) {
factory := NewFactory()

assert.Equal(t, "purefa", string(factory.Type()))
assert.Equal(t, "purefa", factory.Type().String())
}

func TestCreateDefaultConfig(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion receiver/purefbreceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
func TestTypeStr(t *testing.T) {
factory := NewFactory()

assert.Equal(t, "purefb", string(factory.Type()))
assert.Equal(t, "purefb", factory.Type().String())
}

func TestCreateDefaultConfig(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion receiver/skywalkingreceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
func TestTypeStr(t *testing.T) {
factory := NewFactory()

assert.Equal(t, "skywalking", string(factory.Type()))
assert.Equal(t, "skywalking", factory.Type().String())
}

func TestCreateDefaultConfig(t *testing.T) {
Expand Down

0 comments on commit 75f81c4

Please sign in to comment.