@@ -46,9 +46,9 @@ func TestLoadConfig(t *testing.T) {
46
46
NameVal : "datadog" ,
47
47
TypeVal : "datadog" ,
48
48
},
49
- APIKey : "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ,
50
- Site : DefaultSite ,
51
- MetricsEndpoint : "https://api.datadoghq.com" ,
49
+ APIKey : "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ,
50
+ Site : DefaultSite ,
51
+ MetricsURL : "https://api.datadoghq.com" ,
52
52
})
53
53
54
54
e1 := cfg .Exporters ["datadog/2" ].(* Config )
@@ -61,27 +61,27 @@ func TestLoadConfig(t *testing.T) {
61
61
NameVal : "datadog/2" ,
62
62
TypeVal : "datadog" ,
63
63
},
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" ,
67
67
})
68
68
}
69
69
70
- // TestOverrideMetricsEndpoint tests that the metrics endpoint is overridden
70
+ // TestOverrideMetricsURL tests that the metrics URL is overridden
71
71
// correctly when set manually.
72
- func TestOverrideMetricsEndpoint (t * testing.T ) {
72
+ func TestOverrideMetricsURL (t * testing.T ) {
73
73
74
74
const DebugEndpoint string = "http://localhost:8080"
75
75
76
76
cfg := & Config {
77
- APIKey : "notnull" ,
78
- Site : DefaultSite ,
79
- MetricsEndpoint : DebugEndpoint ,
77
+ APIKey : "notnull" ,
78
+ Site : DefaultSite ,
79
+ MetricsURL : DebugEndpoint ,
80
80
}
81
81
82
82
err := cfg .Sanitize ()
83
83
require .NoError (t , err )
84
- assert .Equal (t , cfg .MetricsEndpoint , DebugEndpoint )
84
+ assert .Equal (t , cfg .MetricsURL , DebugEndpoint )
85
85
}
86
86
87
87
// TestUnsetAPIKey tests that the config sanitizing throws an error
0 commit comments