Skip to content

Commit 695430c

Browse files
committed
Fix field name error
MetricsEndpoint was renamed to MetricsURL
1 parent 168b319 commit 695430c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

exporter/datadogexporter/config_test.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ func TestLoadConfig(t *testing.T) {
4646
NameVal: "datadog",
4747
TypeVal: "datadog",
4848
},
49-
APIKey: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
50-
Site: DefaultSite,
51-
MetricsEndpoint: "https://api.datadoghq.com",
49+
APIKey: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
50+
Site: DefaultSite,
51+
MetricsURL: "https://api.datadoghq.com",
5252
})
5353

5454
e1 := cfg.Exporters["datadog/2"].(*Config)
@@ -61,27 +61,27 @@ func TestLoadConfig(t *testing.T) {
6161
NameVal: "datadog/2",
6262
TypeVal: "datadog",
6363
},
64-
APIKey: "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
65-
Site: "datadoghq.eu",
66-
MetricsEndpoint: "https://api.datadoghq.eu",
64+
APIKey: "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
65+
Site: "datadoghq.eu",
66+
MetricsURL: "https://api.datadoghq.eu",
6767
})
6868
}
6969

70-
// TestOverrideMetricsEndpoint tests that the metrics endpoint is overridden
70+
// TestOverrideMetricsURL tests that the metrics URL is overridden
7171
// correctly when set manually.
72-
func TestOverrideMetricsEndpoint(t *testing.T) {
72+
func TestOverrideMetricsURL(t *testing.T) {
7373

7474
const DebugEndpoint string = "http://localhost:8080"
7575

7676
cfg := &Config{
77-
APIKey: "notnull",
78-
Site: DefaultSite,
79-
MetricsEndpoint: DebugEndpoint,
77+
APIKey: "notnull",
78+
Site: DefaultSite,
79+
MetricsURL: DebugEndpoint,
8080
}
8181

8282
err := cfg.Sanitize()
8383
require.NoError(t, err)
84-
assert.Equal(t, cfg.MetricsEndpoint, DebugEndpoint)
84+
assert.Equal(t, cfg.MetricsURL, DebugEndpoint)
8585
}
8686

8787
// TestUnsetAPIKey tests that the config sanitizing throws an error

0 commit comments

Comments
 (0)