@@ -20,12 +20,6 @@ import (
2020 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2121)
2222
23- var defaultScrapeProtocols = []promconfig.ScrapeProtocol {
24- promconfig .OpenMetricsText1_0_0 ,
25- promconfig .OpenMetricsText0_0_1 ,
26- promconfig .PrometheusText0_0_4 ,
27- }
28-
2923func TestLoad (t * testing.T ) {
3024 type args struct {
3125 file string
@@ -69,7 +63,7 @@ func TestLoad(t *testing.T) {
6963 PromConfig : & promconfig.Config {
7064 GlobalConfig : promconfig.GlobalConfig {
7165 ScrapeInterval : model .Duration (60 * time .Second ),
72- ScrapeProtocols : defaultScrapeProtocols ,
66+ ScrapeProtocols : DefaultScrapeProtocols ,
7367 ScrapeTimeout : model .Duration (10 * time .Second ),
7468 EvaluationInterval : model .Duration (60 * time .Second ),
7569 },
@@ -80,7 +74,7 @@ func TestLoad(t *testing.T) {
8074 EnableCompression : true ,
8175 HonorTimestamps : true ,
8276 ScrapeInterval : model .Duration (60 * time .Second ),
83- ScrapeProtocols : defaultScrapeProtocols ,
77+ ScrapeProtocols : DefaultScrapeProtocols ,
8478 ScrapeTimeout : model .Duration (10 * time .Second ),
8579 MetricsPath : "/metrics" ,
8680 Scheme : "http" ,
@@ -156,7 +150,7 @@ func TestLoad(t *testing.T) {
156150 PromConfig : & promconfig.Config {
157151 GlobalConfig : promconfig.GlobalConfig {
158152 ScrapeInterval : model .Duration (60 * time .Second ),
159- ScrapeProtocols : defaultScrapeProtocols ,
153+ ScrapeProtocols : DefaultScrapeProtocols ,
160154 ScrapeTimeout : model .Duration (10 * time .Second ),
161155 EvaluationInterval : model .Duration (60 * time .Second ),
162156 },
@@ -167,7 +161,7 @@ func TestLoad(t *testing.T) {
167161 EnableCompression : true ,
168162 HonorTimestamps : true ,
169163 ScrapeInterval : model .Duration (60 * time .Second ),
170- ScrapeProtocols : defaultScrapeProtocols ,
164+ ScrapeProtocols : DefaultScrapeProtocols ,
171165 ScrapeTimeout : model .Duration (10 * time .Second ),
172166 MetricsPath : "/metrics" ,
173167 Scheme : "http" ,
@@ -231,7 +225,7 @@ func TestLoad(t *testing.T) {
231225 PromConfig : & promconfig.Config {
232226 GlobalConfig : promconfig.GlobalConfig {
233227 ScrapeInterval : model .Duration (60 * time .Second ),
234- ScrapeProtocols : defaultScrapeProtocols ,
228+ ScrapeProtocols : DefaultScrapeProtocols ,
235229 ScrapeTimeout : model .Duration (10 * time .Second ),
236230 EvaluationInterval : model .Duration (60 * time .Second ),
237231 },
@@ -242,7 +236,7 @@ func TestLoad(t *testing.T) {
242236 EnableCompression : true ,
243237 HonorTimestamps : true ,
244238 ScrapeInterval : model .Duration (60 * time .Second ),
245- ScrapeProtocols : defaultScrapeProtocols ,
239+ ScrapeProtocols : DefaultScrapeProtocols ,
246240 ScrapeTimeout : model .Duration (10 * time .Second ),
247241 MetricsPath : "/metrics" ,
248242 Scheme : "http" ,
@@ -330,7 +324,7 @@ func TestLoad(t *testing.T) {
330324 PromConfig : & promconfig.Config {
331325 GlobalConfig : promconfig.GlobalConfig {
332326 ScrapeInterval : model .Duration (60 * time .Second ),
333- ScrapeProtocols : defaultScrapeProtocols ,
327+ ScrapeProtocols : DefaultScrapeProtocols ,
334328 ScrapeTimeout : model .Duration (10 * time .Second ),
335329 EvaluationInterval : model .Duration (60 * time .Second ),
336330 },
@@ -341,7 +335,7 @@ func TestLoad(t *testing.T) {
341335 EnableCompression : true ,
342336 HonorTimestamps : true ,
343337 ScrapeInterval : model .Duration (60 * time .Second ),
344- ScrapeProtocols : defaultScrapeProtocols ,
338+ ScrapeProtocols : DefaultScrapeProtocols ,
345339 ScrapeTimeout : model .Duration (10 * time .Second ),
346340 MetricsPath : "/metrics" ,
347341 Scheme : "http" ,
@@ -429,7 +423,7 @@ func TestLoad(t *testing.T) {
429423 PromConfig : & promconfig.Config {
430424 GlobalConfig : promconfig.GlobalConfig {
431425 ScrapeInterval : model .Duration (60 * time .Second ),
432- ScrapeProtocols : defaultScrapeProtocols ,
426+ ScrapeProtocols : DefaultScrapeProtocols ,
433427 ScrapeTimeout : model .Duration (10 * time .Second ),
434428 EvaluationInterval : model .Duration (60 * time .Second ),
435429 },
@@ -440,7 +434,7 @@ func TestLoad(t *testing.T) {
440434 EnableCompression : true ,
441435 HonorTimestamps : true ,
442436 ScrapeInterval : model .Duration (60 * time .Second ),
443- ScrapeProtocols : defaultScrapeProtocols ,
437+ ScrapeProtocols : DefaultScrapeProtocols ,
444438 ScrapeTimeout : model .Duration (10 * time .Second ),
445439 MetricsPath : "/metrics" ,
446440 Scheme : "http" ,
0 commit comments