Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrod1598 authored and Mrod1598 committed Mar 15, 2022
1 parent 4e863f7 commit 7ecedb6
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 36 deletions.
1 change: 0 additions & 1 deletion receiver/simpleprometheusreceiver/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ func (prw *prometheusReceiverWrapper) Start(ctx context.Context, host component.

prw.prometheusRecever = pr
return prw.prometheusRecever.Start(ctx, host)
return prw.prometheusRecever.(ctx, host)
}

func getPrometheusConfig(cfg *Config) (*prometheusreceiver.Config, error) {
Expand Down
6 changes: 0 additions & 6 deletions receiver/windowsperfcountersreceiver/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ func TestLoadConfig_Error(t *testing.T) {
noCountersErr = `perf counter for object "%s" does not specify any counters`
emptyInstanceErr = `perf counter for object "%s" includes an empty instance`
undefinedMetricErr = `perf counter for object "%s" includes an undefined metric`
missingSumAggregation = `sum metric "%s" does not include an aggregation`
missingMetrics = `must specify at least one metric`
gaugeAndSum = `metric "%s" provides both a sum config and a gauge config`
)
Expand Down Expand Up @@ -143,11 +142,6 @@ func TestLoadConfig_Error(t *testing.T) {
cfgFile: "config-emptyinstance.yaml",
expectedErr: fmt.Sprintf("%s: %s", errorPrefix, fmt.Sprintf(emptyInstanceErr, "object")),
},
{
name: "EmptySumAggregation",
cfgFile: "config-missingsumaggregation.yaml",
expectedErr: fmt.Sprintf("%s: %s", errorPrefix, fmt.Sprintf(missingSumAggregation, "metric")),
},
{
name: "AllErrors",
cfgFile: "config-allerrors.yaml",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
receivers:
windowsperfcounters:
metric_metadata:
metrics:
metric:
description: desc
unit: "1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
receivers:
windowsperfcounters:
metric_metadata:
metrics:
metric:
description: desc
unit: "1"
Expand Down
4 changes: 2 additions & 2 deletions receiver/windowsperfcountersreceiver/testdata/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
receivers:
windowsperfcounters:
metric_metadata:
metrics:
metric:
description: desc
unit: "1"
Expand All @@ -11,7 +11,7 @@ receivers:
- name: counter1
metric: metric
windowsperfcounters/customname:
metric_metadata:
metrics:
metric:
description: desc
unit: "1"
Expand Down

0 comments on commit 7ecedb6

Please sign in to comment.