Skip to content

Commit 6cd458b

Browse files
committedJun 14, 2024·
chore(tests): fix ReloadedByNamespace tests
1 parent 09d9053 commit 6cd458b

File tree

1 file changed

+62
-62
lines changed

1 file changed

+62
-62
lines changed
 

‎internal/pkg/handler/upgrade_test.go

+62-62
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapUsingArs(t *testing.T) {
13181318
t.Errorf("Counter was not increased")
13191319
}
13201320

1321-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1321+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
13221322
t.Errorf("Counter by namespace was not increased")
13231323
}
13241324
}
@@ -1347,7 +1347,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapWithoutReloadAnnotationAndWitho
13471347
t.Errorf("Counter was increased unexpectedly")
13481348
}
13491349

1350-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) > 0 {
1350+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) > 0 {
13511351
t.Errorf("Counter by namespace was increased unexpectedly")
13521352
}
13531353
}
@@ -1378,7 +1378,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapWithoutReloadAnnotationButWithA
13781378
t.Errorf("Counter was not increased")
13791379
}
13801380

1381-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1381+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
13821382
t.Errorf("Counter by namespace was not increased")
13831383
}
13841384
}
@@ -1406,7 +1406,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapInProjectedVolumeUsingArs(t *te
14061406
t.Errorf("Counter was not increased")
14071407
}
14081408

1409-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1409+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
14101410
t.Errorf("Counter by namespace was not increased")
14111411
}
14121412
}
@@ -1435,7 +1435,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationUsingArs(t *
14351435
t.Errorf("Counter was not increased")
14361436
}
14371437

1438-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1438+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
14391439
t.Errorf("Counter by namespace was not increased")
14401440
}
14411441
}
@@ -1465,7 +1465,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNoTriggersUs
14651465
t.Errorf("Counter was increased unexpectedly")
14661466
}
14671467

1468-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) > 0 {
1468+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) > 0 {
14691469
t.Errorf("Counter by namespace was increased unexpectedly")
14701470
}
14711471
}
@@ -1508,7 +1508,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNotMappedUsi
15081508
t.Errorf("Counter was increased unexpectedly")
15091509
}
15101510

1511-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) > 0 {
1511+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) > 0 {
15121512
t.Errorf("Counter by namespace was increased unexpectedly")
15131513
}
15141514
}
@@ -1537,7 +1537,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapInInitContainerUsingArs(t *test
15371537
t.Errorf("Counter was not increased")
15381538
}
15391539

1540-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1540+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
15411541
t.Errorf("Counter by namespace was not increased")
15421542
}
15431543
}
@@ -1566,7 +1566,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapInProjectVolumeInInitContainerU
15661566
t.Errorf("Counter was not increased")
15671567
}
15681568

1569-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1569+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
15701570
t.Errorf("Counter by namespace was not increased")
15711571
}
15721572
}
@@ -1595,7 +1595,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarUsingArs(t *testing.T)
15951595
t.Errorf("Counter was not increased")
15961596
}
15971597

1598-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1598+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
15991599
t.Errorf("Counter by namespace was not increased")
16001600
}
16011601
}
@@ -1624,7 +1624,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarInInitContainerUsingArs
16241624
t.Errorf("Counter was not increased")
16251625
}
16261626

1627-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1627+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
16281628
t.Errorf("Counter by namespace was not increased")
16291629
}
16301630
}
@@ -1653,7 +1653,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarFromUsingArs(t *testing
16531653
t.Errorf("Counter was not increased")
16541654
}
16551655

1656-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1656+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
16571657
t.Errorf("Counter by namespace was not increased")
16581658
}
16591659
}
@@ -1682,7 +1682,7 @@ func TestRollingUpgradeForDeploymentWithSecretUsingArs(t *testing.T) {
16821682
t.Errorf("Counter was not increased")
16831683
}
16841684

1685-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1685+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
16861686
t.Errorf("Counter by namespace was not increased")
16871687
}
16881688
}
@@ -1711,7 +1711,7 @@ func TestRollingUpgradeForDeploymentWithSecretInProjectedVolumeUsingArs(t *testi
17111711
t.Errorf("Counter was not increased")
17121712
}
17131713

1714-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1714+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
17151715
t.Errorf("Counter by namespace was not increased")
17161716
}
17171717
}
@@ -1740,7 +1740,7 @@ func TestRollingUpgradeForDeploymentWithSecretinInitContainerUsingArs(t *testing
17401740
t.Errorf("Counter was not increased")
17411741
}
17421742

1743-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1743+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
17441744
t.Errorf("Counter by namespace was not increased")
17451745
}
17461746
}
@@ -1769,7 +1769,7 @@ func TestRollingUpgradeForDeploymentWithSecretInProjectedVolumeinInitContainerUs
17691769
t.Errorf("Counter was not increased")
17701770
}
17711771

1772-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1772+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
17731773
t.Errorf("Counter by namespace was not increased")
17741774
}
17751775
}
@@ -1798,7 +1798,7 @@ func TestRollingUpgradeForDeploymentWithSecretAsEnvVarUsingArs(t *testing.T) {
17981798
t.Errorf("Counter was not increased")
17991799
}
18001800

1801-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1801+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
18021802
t.Errorf("Counter by namespace was not increased")
18031803
}
18041804
}
@@ -1827,7 +1827,7 @@ func TestRollingUpgradeForDeploymentWithSecretAsEnvVarFromUsingArs(t *testing.T)
18271827
t.Errorf("Counter was not increased")
18281828
}
18291829

1830-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1830+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
18311831
t.Errorf("Counter by namespace was not increased")
18321832
}
18331833
}
@@ -1856,7 +1856,7 @@ func TestRollingUpgradeForDeploymentWithSecretAsEnvVarInInitContainerUsingArs(t
18561856
t.Errorf("Counter was not increased")
18571857
}
18581858

1859-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1859+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
18601860
t.Errorf("Counter by namespace was not increased")
18611861
}
18621862
}
@@ -1885,7 +1885,7 @@ func TestRollingUpgradeForDeploymentWithSecretAutoAnnotationUsingArs(t *testing.
18851885
t.Errorf("Counter was not increased")
18861886
}
18871887

1888-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1888+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
18891889
t.Errorf("Counter by namespace was not increased")
18901890
}
18911891
}
@@ -1914,7 +1914,7 @@ func TestRollingUpgradeForDeploymentWithConfigMapAutoAnnotationUsingArs(t *testi
19141914
t.Errorf("Counter was not increased")
19151915
}
19161916

1917-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1917+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
19181918
t.Errorf("Counter by namespace was not increased")
19191919
}
19201920
}
@@ -1943,7 +1943,7 @@ func TestRollingUpgradeForDaemonSetWithConfigmapUsingArs(t *testing.T) {
19431943
t.Errorf("Counter was not increased")
19441944
}
19451945

1946-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1946+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
19471947
t.Errorf("Counter by namespace was not increased")
19481948
}
19491949
}
@@ -1972,7 +1972,7 @@ func TestRollingUpgradeForDaemonSetWithConfigmapInProjectedVolumeUsingArs(t *tes
19721972
t.Errorf("Counter was not increased")
19731973
}
19741974

1975-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
1975+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
19761976
t.Errorf("Counter by namespace was not increased")
19771977
}
19781978
}
@@ -2001,7 +2001,7 @@ func TestRollingUpgradeForDaemonSetWithConfigmapAsEnvVarUsingArs(t *testing.T) {
20012001
t.Errorf("Counter was not increased")
20022002
}
20032003

2004-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
2004+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
20052005
t.Errorf("Counter by namespace was not increased")
20062006
}
20072007
}
@@ -2030,7 +2030,7 @@ func TestRollingUpgradeForDaemonSetWithSecretUsingArs(t *testing.T) {
20302030
t.Errorf("Counter was not increased")
20312031
}
20322032

2033-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
2033+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
20342034
t.Errorf("Counter by namespace was not increased")
20352035
}
20362036
}
@@ -2059,7 +2059,7 @@ func TestRollingUpgradeForDaemonSetWithSecretInProjectedVolumeUsingArs(t *testin
20592059
t.Errorf("Counter was not increased")
20602060
}
20612061

2062-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
2062+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
20632063
t.Errorf("Counter by namespace was not increased")
20642064
}
20652065
}
@@ -2088,7 +2088,7 @@ func TestRollingUpgradeForStatefulSetWithConfigmapUsingArs(t *testing.T) {
20882088
t.Errorf("Counter was not increased")
20892089
}
20902090

2091-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
2091+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
20922092
t.Errorf("Counter by namespace was not increased")
20932093
}
20942094
}
@@ -2117,7 +2117,7 @@ func TestRollingUpgradeForStatefulSetWithConfigmapInProjectedVolumeUsingArs(t *t
21172117
t.Errorf("Counter was not increased")
21182118
}
21192119

2120-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
2120+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
21212121
t.Errorf("Counter by namespace was not increased")
21222122
}
21232123
}
@@ -2146,7 +2146,7 @@ func TestRollingUpgradeForStatefulSetWithSecretUsingArs(t *testing.T) {
21462146
t.Errorf("Counter was not increased")
21472147
}
21482148

2149-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
2149+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
21502150
t.Errorf("Counter by namespace was not increased")
21512151
}
21522152
}
@@ -2175,7 +2175,7 @@ func TestRollingUpgradeForStatefulSetWithSecretInProjectedVolumeUsingArs(t *test
21752175
t.Errorf("Counter was not increased")
21762176
}
21772177

2178-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
2178+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
21792179
t.Errorf("Counter by namespace was not increased")
21802180
}
21812181
}
@@ -2231,7 +2231,7 @@ func TestRollingUpgradeForDeploymentWithPodAnnotationsUsingArs(t *testing.T) {
22312231
t.Errorf("Counter was not increased")
22322232
}
22332233

2234-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
2234+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
22352235
t.Errorf("Counter by namespace was not increased")
22362236
}
22372237
}
@@ -2253,7 +2253,7 @@ func TestFailedRollingUpgradeUsingArs(t *testing.T) {
22532253
t.Errorf("Counter was not increased")
22542254
}
22552255

2256-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "false", "namespace": arsNamespace})) != 1 {
2256+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "false", "namespace": arsNamespace})) != 1 {
22572257
t.Errorf("Counter by namespace was not increased")
22582258
}
22592259
}
@@ -2282,7 +2282,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapUsingErs(t *testing.T) {
22822282
t.Errorf("Counter was not increased")
22832283
}
22842284

2285-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2285+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
22862286
t.Errorf("Counter by namespace was not increased")
22872287
}
22882288
}
@@ -2310,7 +2310,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapInProjectedVolumeUsingErs(t *te
23102310
t.Errorf("Counter was not increased")
23112311
}
23122312

2313-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2313+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
23142314
t.Errorf("Counter by namespace was not increased")
23152315
}
23162316
}
@@ -2339,7 +2339,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationUsingErs(t *
23392339
t.Errorf("Counter was not increased")
23402340
}
23412341

2342-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2342+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
23432343
t.Errorf("Counter by namespace was not increased")
23442344
}
23452345
}
@@ -2369,7 +2369,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNoTriggersUs
23692369
t.Errorf("Counter was increased unexpectedly")
23702370
}
23712371

2372-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) > 0 {
2372+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) > 0 {
23732373
t.Errorf("Counter by namespace was increased unexpectedly")
23742374
}
23752375
}
@@ -2412,7 +2412,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNotMappedUsi
24122412
t.Errorf("Counter was increased unexpectedly")
24132413
}
24142414

2415-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) > 0 {
2415+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) > 0 {
24162416
t.Errorf("Counter by namespace was increased unexpectedly")
24172417
}
24182418
}
@@ -2441,7 +2441,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapInInitContainerUsingErs(t *test
24412441
t.Errorf("Counter was not increased")
24422442
}
24432443

2444-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2444+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
24452445
t.Errorf("Counter by namespace was not increased")
24462446
}
24472447
}
@@ -2470,7 +2470,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapInProjectVolumeInInitContainerU
24702470
t.Errorf("Counter was not increased")
24712471
}
24722472

2473-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2473+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
24742474
t.Errorf("Counter by namespace was not increased")
24752475
}
24762476
}
@@ -2499,7 +2499,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarUsingErs(t *testing.T)
24992499
t.Errorf("Counter was not increased")
25002500
}
25012501

2502-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2502+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
25032503
t.Errorf("Counter by namespace was not increased")
25042504
}
25052505
}
@@ -2528,7 +2528,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarInInitContainerUsingErs
25282528
t.Errorf("Counter was not increased")
25292529
}
25302530

2531-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2531+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
25322532
t.Errorf("Counter by namespace was not increased")
25332533
}
25342534
}
@@ -2557,7 +2557,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarFromUsingErs(t *testing
25572557
t.Errorf("Counter was not increased")
25582558
}
25592559

2560-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2560+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
25612561
t.Errorf("Counter by namespace was not increased")
25622562
}
25632563
}
@@ -2586,7 +2586,7 @@ func TestRollingUpgradeForDeploymentWithSecretUsingErs(t *testing.T) {
25862586
t.Errorf("Counter was not increased")
25872587
}
25882588

2589-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2589+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
25902590
t.Errorf("Counter by namespace was not increased")
25912591
}
25922592
}
@@ -2615,7 +2615,7 @@ func TestRollingUpgradeForDeploymentWithSecretInProjectedVolumeUsingErs(t *testi
26152615
t.Errorf("Counter was not increased")
26162616
}
26172617

2618-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2618+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
26192619
t.Errorf("Counter by namespace was not increased")
26202620
}
26212621
}
@@ -2644,7 +2644,7 @@ func TestRollingUpgradeForDeploymentWithSecretinInitContainerUsingErs(t *testing
26442644
t.Errorf("Counter was not increased")
26452645
}
26462646

2647-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2647+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
26482648
t.Errorf("Counter by namespace was not increased")
26492649
}
26502650
}
@@ -2673,7 +2673,7 @@ func TestRollingUpgradeForDeploymentWithSecretInProjectedVolumeinInitContainerUs
26732673
t.Errorf("Counter was not increased")
26742674
}
26752675

2676-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2676+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
26772677
t.Errorf("Counter by namespace was not increased")
26782678
}
26792679
}
@@ -2702,7 +2702,7 @@ func TestRollingUpgradeForDeploymentWithSecretAsEnvVarUsingErs(t *testing.T) {
27022702
t.Errorf("Counter was not increased")
27032703
}
27042704

2705-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2705+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
27062706
t.Errorf("Counter by namespace was not increased")
27072707
}
27082708
}
@@ -2731,7 +2731,7 @@ func TestRollingUpgradeForDeploymentWithSecretAsEnvVarFromUsingErs(t *testing.T)
27312731
t.Errorf("Counter was not increased")
27322732
}
27332733

2734-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2734+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
27352735
t.Errorf("Counter by namespace was not increased")
27362736
}
27372737
}
@@ -2760,7 +2760,7 @@ func TestRollingUpgradeForDeploymentWithSecretAsEnvVarInInitContainerUsingErs(t
27602760
t.Errorf("Counter was not increased")
27612761
}
27622762

2763-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2763+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
27642764
t.Errorf("Counter by namespace was not increased")
27652765
}
27662766
}
@@ -2789,7 +2789,7 @@ func TestRollingUpgradeForDeploymentWithSecretAutoAnnotationUsingErs(t *testing.
27892789
t.Errorf("Counter was not increased")
27902790
}
27912791

2792-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2792+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
27932793
t.Errorf("Counter by namespace was not increased")
27942794
}
27952795
}
@@ -2818,7 +2818,7 @@ func TestRollingUpgradeForDeploymentWithConfigMapAutoAnnotationUsingErs(t *testi
28182818
t.Errorf("Counter was not increased")
28192819
}
28202820

2821-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2821+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
28222822
t.Errorf("Counter by namespace was not increased")
28232823
}
28242824
}
@@ -2847,7 +2847,7 @@ func TestRollingUpgradeForDaemonSetWithConfigmapUsingErs(t *testing.T) {
28472847
t.Errorf("Counter was not increased")
28482848
}
28492849

2850-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2850+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
28512851
t.Errorf("Counter by namespace was not increased")
28522852
}
28532853
}
@@ -2876,7 +2876,7 @@ func TestRollingUpgradeForDaemonSetWithConfigmapInProjectedVolumeUsingErs(t *tes
28762876
t.Errorf("Counter was not increased")
28772877
}
28782878

2879-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2879+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
28802880
t.Errorf("Counter by namespace was not increased")
28812881
}
28822882
}
@@ -2905,7 +2905,7 @@ func TestRollingUpgradeForDaemonSetWithConfigmapAsEnvVarUsingErs(t *testing.T) {
29052905
t.Errorf("Counter was not increased")
29062906
}
29072907

2908-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2908+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
29092909
t.Errorf("Counter by namespace was not increased")
29102910
}
29112911
}
@@ -2934,7 +2934,7 @@ func TestRollingUpgradeForDaemonSetWithSecretUsingErs(t *testing.T) {
29342934
t.Errorf("Counter was not increased")
29352935
}
29362936

2937-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2937+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
29382938
t.Errorf("Counter by namespace was not increased")
29392939
}
29402940
}
@@ -2963,7 +2963,7 @@ func TestRollingUpgradeForDaemonSetWithSecretInProjectedVolumeUsingErs(t *testin
29632963
t.Errorf("Counter was not increased")
29642964
}
29652965

2966-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2966+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
29672967
t.Errorf("Counter by namespace was not increased")
29682968
}
29692969
}
@@ -2992,7 +2992,7 @@ func TestRollingUpgradeForStatefulSetWithConfigmapUsingErs(t *testing.T) {
29922992
t.Errorf("Counter was not increased")
29932993
}
29942994

2995-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
2995+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
29962996
t.Errorf("Counter by namespace was not increased")
29972997
}
29982998
}
@@ -3021,7 +3021,7 @@ func TestRollingUpgradeForStatefulSetWithConfigmapInProjectedVolumeUsingErs(t *t
30213021
t.Errorf("Counter was not increased")
30223022
}
30233023

3024-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
3024+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
30253025
t.Errorf("Counter by namespace was not increased")
30263026
}
30273027
}
@@ -3050,7 +3050,7 @@ func TestRollingUpgradeForStatefulSetWithSecretUsingErs(t *testing.T) {
30503050
t.Errorf("Counter was not increased")
30513051
}
30523052

3053-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
3053+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
30543054
t.Errorf("Counter by namespace was not increased")
30553055
}
30563056
}
@@ -3079,7 +3079,7 @@ func TestRollingUpgradeForStatefulSetWithSecretInProjectedVolumeUsingErs(t *test
30793079
t.Errorf("Counter was not increased")
30803080
}
30813081

3082-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
3082+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
30833083
t.Errorf("Counter by namespace was not increased")
30843084
}
30853085
}
@@ -3136,7 +3136,7 @@ func TestRollingUpgradeForDeploymentWithPodAnnotationsUsingErs(t *testing.T) {
31363136
t.Errorf("Counter was not increased")
31373137
}
31383138

3139-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
3139+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
31403140
t.Errorf("Counter by namespace was not increased")
31413141
}
31423142
}
@@ -3158,7 +3158,7 @@ func TestFailedRollingUpgradeUsingErs(t *testing.T) {
31583158
t.Errorf("Counter was not increased")
31593159
}
31603160

3161-
if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "false", "namespace": ersNamespace})) != 1 {
3161+
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "false", "namespace": ersNamespace})) != 1 {
31623162
t.Errorf("Counter by namespace was not increased")
31633163
}
31643164
}

0 commit comments

Comments
 (0)
Please sign in to comment.