Skip to content

Commit

Permalink
make fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Jared Tan <jian.tan@daocloud.io>
  • Loading branch information
JaredTan95 committed Aug 28, 2024
1 parent 66756a8 commit 1ed092d
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 22 deletions.
4 changes: 2 additions & 2 deletions exporter/veopscmdbexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
| ------------- |-----------|
| Stability | [alpha]: logs |
| Distributions | [contrib] |
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fhoneycombmarker%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fhoneycombmarker) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fhoneycombmarker%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fhoneycombmarker) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@TylerHelmuth](https://www.github.com/TylerHelmuth), [@fchikwekwe](https://www.github.com/fchikwekwe) |
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fveopscmdb%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fveopscmdb) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fveopscmdb%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fveopscmdb) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@JaredTan95](https://www.github.com/JaredTan95) |

[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
Expand Down
14 changes: 7 additions & 7 deletions exporter/veopscmdbexporter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"path/filepath"
"testing"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/veopscmdbexporter/internal/metadata"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/confmap/confmaptest"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/veopscmdbexporter/internal/metadata"
)

func TestLoadConfig(t *testing.T) {
Expand All @@ -27,11 +28,10 @@ func TestLoadConfig(t *testing.T) {
{
id: component.NewIDWithName(metadata.Type, ""),
expected: &Config{
APIKey: "test-apikey",
APIAddress: "http://localhost:5000",
CIMatches: map[string]string{
"namespaces": "1",
},
APIKey: "test-apikey",
APIAddress: "http://localhost:5000",
APISecret: "test-apisecret",
KubernetesClusterCIType: 58,
},
},
}
Expand All @@ -43,7 +43,7 @@ func TestLoadConfig(t *testing.T) {

sub, err := cm.Sub(tt.id.String())
require.NoError(t, err)
require.NoError(t, component.UnmarshalConfig(sub, cfg))
require.NoError(t, sub.Unmarshal(cfg))

if tt.expected == nil {
err = component.ValidateConfig(cfg)
Expand Down
2 changes: 1 addition & 1 deletion exporter/veopscmdbexporter/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestFactory_CreateLogsExporter(t *testing.T) {
cfg := withDefaultConfig(func(cfg *Config) {
cfg.APIAddress = defaultURL
})
params := exportertest.NewNopCreateSettings()
params := exportertest.NewNopSettings()
exporter, err := factory.CreateLogsExporter(context.Background(), params, cfg)
require.NoError(t, err)
require.NotNil(t, exporter)
Expand Down
10 changes: 5 additions & 5 deletions exporter/veopscmdbexporter/generated_component_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions exporter/veopscmdbexporter/logs_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ package veopscmdbexporter // import "github.com/open-telemetry/opentelemetry-col
import (
"context"
"fmt"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/expr"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottllog"
"net/http"
"runtime"

"github.com/tidwall/gjson"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/config/configopaque"
"go.opentelemetry.io/collector/exporter"
"go.opentelemetry.io/collector/pdata/plog"
"go.uber.org/zap"
"net/http"
"runtime"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/expr"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottllog"
)

type marker struct {
Expand Down
3 changes: 1 addition & 2 deletions exporter/veopscmdbexporter/testdata/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
veopscmdbexporter:
api_key: "test-apikey"
api_secret: "test-apisecret"
ci_matches:
kubernetes_cluster_type: 58
kubernetes_cluster_ci_type: 58
#namespaces_type: "1"

0 comments on commit 1ed092d

Please sign in to comment.