@@ -34,15 +34,11 @@ func Test_Cfg2ES(t *testing.T) {
34
34
err = psr .WithCfgResources (* cfgRouter .Label , cfgResources )
35
35
g .Expect (err ).NotTo (HaveOccurred ())
36
36
37
- // we should not see any permutations in serialized config
38
- i := 0
39
- for i < maxRuntimes {
37
+ for i := 0 ; i < maxRuntimes ; i ++ {
40
38
config , errs := psr .RenderMainConfig (false )
41
39
// fmt.Println(config)
42
40
g .Expect (errs ).NotTo (HaveOccurred ())
43
41
g .Expect (string (getExpectedCfg ("./expected/fluentd-namespaced-cfg-output-es.cfg" ))).To (Equal (config ))
44
-
45
- i ++
46
42
}
47
43
}
48
44
@@ -66,7 +62,6 @@ func Test_ClusterCfgInputTail(t *testing.T) {
66
62
g .Expect (errs ).NotTo (HaveOccurred ())
67
63
g .Expect (string (getExpectedCfg ("./expected/fluentd-global-cfg-input-tail.cfg" ))).To (Equal (config ))
68
64
}
69
-
70
65
}
71
66
72
67
func Test_ClusterCfgInputSample (t * testing.T ) {
@@ -127,14 +122,10 @@ func Test_ClusterCfgOutput2ES(t *testing.T) {
127
122
err = psr .WithCfgResources (* clustercfgRouter .Label , clustercfgResources )
128
123
g .Expect (err ).NotTo (HaveOccurred ())
129
124
130
- // we should not see any permutations in serialized config
131
- i := 0
132
- for i < maxRuntimes {
125
+ for i := 0 ; i < maxRuntimes ; i ++ {
133
126
config , errs := psr .RenderMainConfig (false )
134
127
g .Expect (errs ).NotTo (HaveOccurred ())
135
128
g .Expect (string (getExpectedCfg ("./expected/fluentd-cluster-cfg-output-es.cfg" ))).To (Equal (config ))
136
-
137
- i ++
138
129
}
139
130
}
140
131
@@ -153,14 +144,10 @@ func Test_ClusterCfgOutput2ESDataStream(t *testing.T) {
153
144
err = psr .WithCfgResources (* clustercfgRouter .Label , clustercfgResources )
154
145
g .Expect (err ).NotTo (HaveOccurred ())
155
146
156
- // we should not see any permutations in serialized config
157
- i := 0
158
- for i < maxRuntimes {
147
+ for i := 0 ; i < maxRuntimes ; i ++ {
159
148
config , errs := psr .RenderMainConfig (false )
160
149
g .Expect (errs ).NotTo (HaveOccurred ())
161
150
g .Expect (string (getExpectedCfg ("./expected/fluentd-cluster-cfg-output-es-data-stream.cfg" ))).To (Equal (config ))
162
-
163
- i ++
164
151
}
165
152
}
166
153
@@ -180,14 +167,10 @@ func Test_ClusterCfgOutput2CopyESDataStream(t *testing.T) {
180
167
err = psr .WithCfgResources (* clustercfgRouter .Label , clustercfgResources )
181
168
g .Expect (err ).NotTo (HaveOccurred ())
182
169
183
- // we should not see any permutations in serialized config
184
- i := 0
185
- for i < maxRuntimes {
170
+ for i := 0 ; i < maxRuntimes ; i ++ {
186
171
config , errs := psr .RenderMainConfig (false )
187
172
g .Expect (errs ).NotTo (HaveOccurred ())
188
173
g .Expect (string (getExpectedCfg ("./expected/fluentd-cluster-cfg-output-copy-es-data-stream.cfg" ))).To (Equal (config ))
189
-
190
- i ++
191
174
}
192
175
}
193
176
@@ -205,14 +188,10 @@ func Test_Cfg2OpenSearch(t *testing.T) {
205
188
err = psr .WithCfgResources (* cfgRouter .Label , cfgResources )
206
189
g .Expect (err ).NotTo (HaveOccurred ())
207
190
208
- // we should not see any permutations in serialized config
209
- i := 0
210
- for i < maxRuntimes {
191
+ for i := 0 ; i < maxRuntimes ; i ++ {
211
192
config , errs := psr .RenderMainConfig (false )
212
193
g .Expect (errs ).NotTo (HaveOccurred ())
213
194
g .Expect (string (getExpectedCfg ("./expected/fluentd-namespaced-cfg-output-opensearch.cfg" ))).To (Equal (config ))
214
-
215
- i ++
216
195
}
217
196
}
218
197
@@ -231,15 +210,11 @@ func Test_ClusterCfgOutput2OpenSearch(t *testing.T) {
231
210
err = psr .WithCfgResources (* clustercfgRouter .Label , clustercfgResources )
232
211
g .Expect (err ).NotTo (HaveOccurred ())
233
212
234
- // we should not see any permutations in serialized config
235
- i := 0
236
- for i < maxRuntimes {
213
+ for i := 0 ; i < maxRuntimes ; i ++ {
237
214
config , errs := psr .RenderMainConfig (false )
238
215
//fmt.Println(config)
239
216
g .Expect (errs ).NotTo (HaveOccurred ())
240
217
g .Expect (string (getExpectedCfg ("./expected/fluentd-cluster-cfg-output-opensearch.cfg" ))).To (Equal (config ))
241
-
242
- i ++
243
218
}
244
219
}
245
220
@@ -258,15 +233,11 @@ func Test_ClusterCfgOutput2Kafka(t *testing.T) {
258
233
err = psr .WithCfgResources (* clustercfgRouter .Label , clustercfgResources )
259
234
g .Expect (err ).NotTo (HaveOccurred ())
260
235
261
- // we should not see any permutations in serialized config
262
- i := 0
263
- for i < maxRuntimes {
236
+ for i := 0 ; i < maxRuntimes ; i ++ {
264
237
config , errs := psr .RenderMainConfig (false )
265
238
// fmt.Println(config)
266
239
g .Expect (errs ).NotTo (HaveOccurred ())
267
240
g .Expect (string (getExpectedCfg ("./expected/fluentd-cluster-cfg-output-kafka.cfg" ))).To (Equal (config ))
268
-
269
- i ++
270
241
}
271
242
}
272
243
@@ -285,15 +256,11 @@ func Test_ClusterCfgOutput2Loki(t *testing.T) {
285
256
err = psr .WithCfgResources (* clustercfgRouter .Label , clustercfgResources )
286
257
g .Expect (err ).NotTo (HaveOccurred ())
287
258
288
- // we should not see any permutations in serialized config
289
- i := 0
290
- for i < maxRuntimes {
259
+ for i := 0 ; i < maxRuntimes ; i ++ {
291
260
config , errs := psr .RenderMainConfig (false )
292
261
// fmt.Println(config)
293
262
g .Expect (errs ).NotTo (HaveOccurred ())
294
263
g .Expect (string (getExpectedCfg ("./expected/fluentd-cluster-cfg-output-loki.cfg" ))).To (Equal (config ))
295
-
296
- i ++
297
264
}
298
265
}
299
266
@@ -317,15 +284,11 @@ func Test_MixedCfgs2ES(t *testing.T) {
317
284
err = psr .WithCfgResources (* cfgRouter .Label , cfgResources )
318
285
g .Expect (err ).NotTo (HaveOccurred ())
319
286
320
- // we should not see any permutations in serialized config
321
- i := 0
322
- for i < maxRuntimes {
287
+ for i := 0 ; i < maxRuntimes ; i ++ {
323
288
config , errs := psr .RenderMainConfig (false )
324
289
// fmt.Println(config)
325
290
g .Expect (errs ).NotTo (HaveOccurred ())
326
291
g .Expect (string (getExpectedCfg ("./expected/fluentd-mixed-cfgs-output-es.cfg" ))).To (Equal (config ))
327
-
328
- i ++
329
292
}
330
293
}
331
294
@@ -344,14 +307,10 @@ func Test_ClusterCfgOutput2CloudWatch(t *testing.T) {
344
307
err = psr .WithCfgResources (* clustercfgRouter .Label , clustercfgResources )
345
308
g .Expect (err ).NotTo (HaveOccurred ())
346
309
347
- // we should not see any permutations in serialized config
348
- i := 0
349
- for i < maxRuntimes {
310
+ for i := 0 ; i < maxRuntimes ; i ++ {
350
311
config , errs := psr .RenderMainConfig (false )
351
312
g .Expect (errs ).NotTo (HaveOccurred ())
352
313
g .Expect (strings .TrimSpace (string (getExpectedCfg ("./expected/fluentd-cluster-cfg-output-cloudwatch.cfg" )))).To (Equal (config ))
353
-
354
- i ++
355
314
}
356
315
}
357
316
@@ -370,14 +329,10 @@ func Test_ClusterCfgOutput2Datadog(t *testing.T) {
370
329
err = psr .WithCfgResources (* clustercfgRouter .Label , clustercfgResources )
371
330
g .Expect (err ).NotTo (HaveOccurred ())
372
331
373
- // we should not see any permutations in serialized config
374
- i := 0
375
- for i < maxRuntimes {
332
+ for i := 0 ; i < maxRuntimes ; i ++ {
376
333
config , errs := psr .RenderMainConfig (false )
377
334
g .Expect (errs ).NotTo (HaveOccurred ())
378
335
g .Expect (strings .TrimSpace (string (getExpectedCfg ("./expected/fluentd-cluster-cfg-output-datadog.cfg" )))).To (Equal (config ))
379
-
380
- i ++
381
336
}
382
337
}
383
338
@@ -401,7 +356,6 @@ func Test_ClusterCfgOutput2Null(t *testing.T) {
401
356
g .Expect (errs ).NotTo (HaveOccurred ())
402
357
g .Expect (strings .TrimSpace (string (getExpectedCfg ("./expected/fluentd-cluster-cfg-output-null.cfg" )))).To (Equal (config ))
403
358
}
404
-
405
359
}
406
360
407
361
func Test_MixedCfgCopy1 (t * testing.T ) {
@@ -426,15 +380,11 @@ func Test_MixedCfgCopy1(t *testing.T) {
426
380
err = psr .WithCfgResources (* cfgRouter .Label , cfgResources )
427
381
g .Expect (err ).NotTo (HaveOccurred ())
428
382
429
- // we should not see any permutations in serialized config
430
- i := 0
431
- for i < maxRuntimes {
383
+ for i := 0 ; i < maxRuntimes ; i ++ {
432
384
config , errs := psr .RenderMainConfig (false )
433
385
// fmt.Println(config)
434
386
g .Expect (errs ).NotTo (HaveOccurred ())
435
387
g .Expect (string (getExpectedCfg ("./expected/fluentd-mixed-cfgs-output-copy-1.cfg" ))).To (Equal (config ))
436
-
437
- i ++
438
388
}
439
389
}
440
390
@@ -459,15 +409,11 @@ func Test_MixedCfgCopy2(t *testing.T) {
459
409
err = psr .WithCfgResources (* cfgRouter .Label , cfgResources )
460
410
g .Expect (err ).NotTo (HaveOccurred ())
461
411
462
- // we should not see any permutations in serialized config
463
- i := 0
464
- for i < maxRuntimes {
412
+ for i := 0 ; i < maxRuntimes ; i ++ {
465
413
config , errs := psr .RenderMainConfig (false )
466
414
// fmt.Println(config)
467
415
g .Expect (errs ).NotTo (HaveOccurred ())
468
416
g .Expect (string (getExpectedCfg ("./expected/fluentd-mixed-cfgs-output-copy-2.cfg" ))).To (Equal (config ))
469
-
470
- i ++
471
417
}
472
418
}
473
419
@@ -492,15 +438,11 @@ func Test_MixedCfgCopy3(t *testing.T) {
492
438
err = psr .WithCfgResources (* cfgRouter .Label , cfgResources )
493
439
g .Expect (err ).NotTo (HaveOccurred ())
494
440
495
- // we should not see any permutations in serialized config
496
- i := 0
497
- for i < maxRuntimes {
441
+ for i := 0 ; i < maxRuntimes ; i ++ {
498
442
config , errs := psr .RenderMainConfig (false )
499
443
// fmt.Println(config)
500
444
g .Expect (errs ).NotTo (HaveOccurred ())
501
445
g .Expect (string (getExpectedCfg ("./expected/fluentd-mixed-cfgs-output-copy-3.cfg" ))).To (Equal (config ))
502
-
503
- i ++
504
446
}
505
447
}
506
448
@@ -528,14 +470,10 @@ func Test_MixedCfgCopy4(t *testing.T) {
528
470
err = psr .WithCfgResources (* cfgRouter .Label , cfgResources )
529
471
g .Expect (err ).NotTo (HaveOccurred ())
530
472
531
- // we should not see any permutations in serialized config
532
- i := 0
533
- for i < maxRuntimes {
473
+ for i := 0 ; i < maxRuntimes ; i ++ {
534
474
config , errs := psr .RenderMainConfig (false )
535
475
g .Expect (errs ).NotTo (HaveOccurred ())
536
476
g .Expect (string (getExpectedCfg ("./expected/fluentd-mixed-cfgs-output-copy-4.cfg" ))).To (Equal (config ))
537
-
538
- i ++
539
477
}
540
478
}
541
479
@@ -557,15 +495,11 @@ func Test_ClusterCfgOutput2StdoutAndLoki(t *testing.T) {
557
495
err = psr .WithCfgResources (* clustercfgRouter .Label , clustercfgResources )
558
496
g .Expect (err ).NotTo (HaveOccurred ())
559
497
560
- // we should not see any permutations in serialized config
561
- i := 0
562
- for i < maxRuntimes {
498
+ for i := 0 ; i < maxRuntimes ; i ++ {
563
499
config , errs := psr .RenderMainConfig (false )
564
500
// fmt.Println(config)
565
501
g .Expect (errs ).NotTo (HaveOccurred ())
566
502
g .Expect (string (getExpectedCfg ("./expected/fluentd-cluster-cfg-output-stdout-and-loki.cfg" ))).To (Equal (config ))
567
-
568
- i ++
569
503
}
570
504
}
571
505
@@ -589,15 +523,11 @@ func Test_MixedCfgs2OpenSearch(t *testing.T) {
589
523
err = psr .WithCfgResources (* cfgRouter .Label , cfgResources )
590
524
g .Expect (err ).NotTo (HaveOccurred ())
591
525
592
- // we should not see any permutations in serialized config
593
- i := 0
594
- for i < maxRuntimes {
526
+ for i := 0 ; i < maxRuntimes ; i ++ {
595
527
config , errs := psr .RenderMainConfig (false )
596
528
// fmt.Println(config)
597
529
g .Expect (errs ).NotTo (HaveOccurred ())
598
530
g .Expect (string (getExpectedCfg ("./expected/fluentd-mixed-cfgs-output-opensearch.cfg" ))).To (Equal (config ))
599
-
600
- i ++
601
531
}
602
532
}
603
533
@@ -626,15 +556,11 @@ func Test_MixedCfgs2MultiTenant(t *testing.T) {
626
556
err = psr .WithCfgResources (* cfgRouter .Label , cfgResourcesForUser1 )
627
557
g .Expect (err ).NotTo (HaveOccurred ())
628
558
629
- // we should not see any permutations in serialized config
630
- i := 0
631
- for i < maxRuntimes {
559
+ for i := 0 ; i < maxRuntimes ; i ++ {
632
560
config , errs := psr .RenderMainConfig (false )
633
561
// fmt.Println(config)
634
562
g .Expect (errs ).NotTo (HaveOccurred ())
635
563
g .Expect (string (getExpectedCfg ("./expected/fluentd-mixed-cfgs-multi-tenant-output.cfg" ))).To (Equal (config ))
636
-
637
- i ++
638
564
}
639
565
}
640
566
@@ -653,15 +579,11 @@ func Test_OutputWithBuffer(t *testing.T) {
653
579
err = psr .WithCfgResources (* clustercfgRouter .Label , clustercfgResources )
654
580
g .Expect (err ).NotTo (HaveOccurred ())
655
581
656
- // we should not see any permutations in serialized config
657
- i := 0
658
- for i < maxRuntimes {
582
+ for i := 0 ; i < maxRuntimes ; i ++ {
659
583
config , errs := psr .RenderMainConfig (false )
660
584
// fmt.Println(config)
661
585
g .Expect (errs ).NotTo (HaveOccurred ())
662
586
g .Expect (string (getExpectedCfg ("./expected/fluentd-cluster-cfg-output-buffer-example.cfg" ))).To (Equal (config ))
663
-
664
- i ++
665
587
}
666
588
}
667
589
@@ -680,15 +602,11 @@ func Test_OutputWithMemoryBuffer(t *testing.T) {
680
602
err = psr .WithCfgResources (* clustercfgRouter .Label , clustercfgResources )
681
603
g .Expect (err ).NotTo (HaveOccurred ())
682
604
683
- // we should not see any permutations in serialized config
684
- i := 0
685
- for i < maxRuntimes {
605
+ for i := 0 ; i < maxRuntimes ; i ++ {
686
606
config , errs := psr .RenderMainConfig (false )
687
607
// fmt.Println(config)
688
608
g .Expect (errs ).NotTo (HaveOccurred ())
689
609
g .Expect (string (getExpectedCfg ("./expected/fluentd-cluster-cfg-output-memory-buffer.cfg" ))).To (Equal (config ))
690
-
691
- i ++
692
610
}
693
611
}
694
612
@@ -887,15 +805,11 @@ func Test_DuplicateRemovalCRSpecs(t *testing.T) {
887
805
err = psr .WithCfgResources (* cfgRouter .Label , cfgResources )
888
806
g .Expect (err ).NotTo (HaveOccurred ())
889
807
890
- // we should not see any permutations in serialized config
891
- i := 0
892
- for i < maxRuntimes {
808
+ for i := 0 ; i < maxRuntimes ; i ++ {
893
809
config , errs := psr .RenderMainConfig (false )
894
810
// fmt.Println(config)
895
811
g .Expect (errs ).NotTo (HaveOccurred ())
896
812
g .Expect (string (getExpectedCfg ("./expected/duplicate-removal-cr-specs.cfg" ))).To (Equal (config ))
897
-
898
- i ++
899
813
}
900
814
}
901
815
@@ -914,15 +828,11 @@ func Test_RecordTransformer(t *testing.T) {
914
828
err = psr .WithCfgResources (* clustercfgRouter .Label , clustercfgResources )
915
829
g .Expect (err ).NotTo (HaveOccurred ())
916
830
917
- // we should not see any permutations in serialized config
918
- i := 0
919
- for i < maxRuntimes {
831
+ for i := 0 ; i < maxRuntimes ; i ++ {
920
832
config , errs := psr .RenderMainConfig (false )
921
833
// fmt.Println(config)
922
834
g .Expect (errs ).NotTo (HaveOccurred ())
923
835
g .Expect (string (getExpectedCfg ("./expected/fluentd-cluster-cfg-filter-recordTransformer.cfg" ))).To (Equal (config ))
924
-
925
- i ++
926
836
}
927
837
}
928
838
0 commit comments