Remove unused Configuration key from MetricConfig

This fixes an issue of setting up a ZMON collector where the incorrect
key `Configuration` was used, which was not initialized in the metrics
config parser. The `Config` key is the right one to use.

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
This commit is contained in:
Mikkel Oscar Lyderik Larsen
2019-04-26 16:19:49 +02:00
parent 5a6f4997bd
commit 3f019a1ceb
3 changed files with 8 additions and 9 deletions

View File

@@ -28,7 +28,7 @@ func TestZMONCollectorNewCollector(t *testing.T) {
MetricTypeName: MetricTypeName{
Metric: newMetricIdentifier(ZMONCheckMetric),
},
Configuration: map[string]string{
Config: map[string]string{
zmonCheckIDLabelKey: "1234",
zmonAggregatorsLabelKey: "max",
zmonTagPrefixLabelKey + "alias": "cluster_alias",
@@ -70,7 +70,7 @@ func TestZMONCollectorNewCollector(t *testing.T) {
require.Error(t, err)
// should fail if the check id is not specified.
delete(config.Configuration, zmonCheckIDLabelKey)
delete(config.Config, zmonCheckIDLabelKey)
config.Metric.Name = ZMONCheckMetric
_, err = collectPlugin.NewCollector(nil, config, 1*time.Second)
require.Error(t, err)
@@ -88,7 +88,7 @@ func TestZMONCollectorGetMetrics(tt *testing.T) {
Metric: newMetricIdentifier(ZMONCheckMetric),
Type: "foo",
},
Configuration: map[string]string{
Config: map[string]string{
zmonCheckIDLabelKey: "1234",
zmonAggregatorsLabelKey: "max",
zmonTagPrefixLabelKey + "alias": "cluster_alias",