@@ -115,7 +115,6 @@ func TestProcess(t *testing.T) {
115
115
},
116
116
& entry.Entry {
117
117
Attributes : map [string ]any {
118
- "time" : "2029-03-30T08:31:20.545192187Z" ,
119
118
"log.iostream" : "stdout" ,
120
119
},
121
120
Body : "INFO: log line here" ,
@@ -135,7 +134,6 @@ func TestProcess(t *testing.T) {
135
134
},
136
135
& entry.Entry {
137
136
Attributes : map [string ]any {
138
- "time" : "2029-03-30T08:31:20.545192187Z" ,
139
137
"log.iostream" : "stdout" ,
140
138
},
141
139
Body : "INFO: log line here" ,
@@ -158,7 +156,6 @@ func TestProcess(t *testing.T) {
158
156
},
159
157
& entry.Entry {
160
158
Attributes : map [string ]any {
161
- "time" : "2029-03-30T08:31:20.545192187Z" ,
162
159
"log.iostream" : "stdout" ,
163
160
"log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
164
161
},
@@ -215,7 +212,6 @@ func TestRecombineProcess(t *testing.T) {
215
212
[]* entry.Entry {
216
213
{
217
214
Attributes : map [string ]any {
218
- "time" : "2024-04-13T07:59:37.505201169-10:00" ,
219
215
"log.iostream" : "stdout" ,
220
216
"logtag" : "F" ,
221
217
"log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
@@ -251,7 +247,6 @@ func TestRecombineProcess(t *testing.T) {
251
247
[]* entry.Entry {
252
248
{
253
249
Attributes : map [string ]any {
254
- "time" : "2024-04-13T07:59:37.505201169Z" ,
255
250
"log.iostream" : "stdout" ,
256
251
"logtag" : "F" ,
257
252
"log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
@@ -293,7 +288,6 @@ func TestRecombineProcess(t *testing.T) {
293
288
[]* entry.Entry {
294
289
{
295
290
Attributes : map [string ]any {
296
- "time" : "2024-04-13T07:59:37.505201169-10:00" ,
297
291
"log.iostream" : "stdout" ,
298
292
"logtag" : "P" ,
299
293
"log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
@@ -335,7 +329,6 @@ func TestRecombineProcess(t *testing.T) {
335
329
[]* entry.Entry {
336
330
{
337
331
Attributes : map [string ]any {
338
- "time" : "2024-04-13T07:59:37.505201169Z" ,
339
332
"log.iostream" : "stdout" ,
340
333
"logtag" : "P" ,
341
334
"log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
@@ -418,7 +411,6 @@ func TestCRIRecombineProcessWithFailedDownstreamOperator(t *testing.T) {
418
411
[]* entry.Entry {
419
412
{
420
413
Attributes : map [string ]any {
421
- "time" : "2024-04-13T07:59:37.505201169-10:00" ,
422
414
"log.iostream" : "stdout" ,
423
415
"logtag" : "P" ,
424
416
"log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
@@ -435,7 +427,6 @@ func TestCRIRecombineProcessWithFailedDownstreamOperator(t *testing.T) {
435
427
},
436
428
{
437
429
Attributes : map [string ]any {
438
- "time" : "2024-04-13T07:59:37.505201169-10:00" ,
439
430
"log.iostream" : "stdout" ,
440
431
"logtag" : "F" ,
441
432
"log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
@@ -483,7 +474,6 @@ func TestCRIRecombineProcessWithFailedDownstreamOperator(t *testing.T) {
483
474
[]* entry.Entry {
484
475
{
485
476
Attributes : map [string ]any {
486
- "time" : "2024-04-13T07:59:37.505201169Z" ,
487
477
"log.iostream" : "stdout" ,
488
478
"logtag" : "P" ,
489
479
"log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
@@ -500,7 +490,6 @@ func TestCRIRecombineProcessWithFailedDownstreamOperator(t *testing.T) {
500
490
},
501
491
{
502
492
Attributes : map [string ]any {
503
- "time" : "2024-04-13T07:59:37.505201169Z" ,
504
493
"log.iostream" : "stdout" ,
505
494
"logtag" : "F" ,
506
495
"log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
@@ -545,11 +534,11 @@ func TestCRIRecombineProcessWithFailedDownstreamOperator(t *testing.T) {
545
534
}
546
535
}
547
536
548
- func TestProcessWithTimeRemovalFlag (t * testing.T ) {
537
+ func TestProcessWithTimeRemovalFlagDisabled (t * testing.T ) {
549
538
550
- require .NoError (t , featuregate .GlobalRegistry ().Set (removeOriginalTimeField .ID (), true ))
539
+ require .NoError (t , featuregate .GlobalRegistry ().Set (removeOriginalTimeField .ID (), false ))
551
540
t .Cleanup (func () {
552
- require .NoError (t , featuregate .GlobalRegistry ().Set (removeOriginalTimeField .ID (), false ))
541
+ require .NoError (t , featuregate .GlobalRegistry ().Set (removeOriginalTimeField .ID (), true ))
553
542
})
554
543
555
544
cases := []struct {
@@ -572,6 +561,7 @@ func TestProcessWithTimeRemovalFlag(t *testing.T) {
572
561
},
573
562
& entry.Entry {
574
563
Attributes : map [string ]any {
564
+ "time" : "2029-03-30T08:31:20.545192187Z" ,
575
565
"log.iostream" : "stdout" ,
576
566
},
577
567
Body : "INFO: log line here" ,
@@ -591,6 +581,7 @@ func TestProcessWithTimeRemovalFlag(t *testing.T) {
591
581
},
592
582
& entry.Entry {
593
583
Attributes : map [string ]any {
584
+ "time" : "2029-03-30T08:31:20.545192187Z" ,
594
585
"log.iostream" : "stdout" ,
595
586
},
596
587
Body : "INFO: log line here" ,
@@ -614,6 +605,7 @@ func TestProcessWithTimeRemovalFlag(t *testing.T) {
614
605
& entry.Entry {
615
606
Attributes : map [string ]any {
616
607
"log.iostream" : "stdout" ,
608
+ "time" : "2029-03-30T08:31:20.545192187Z" ,
617
609
"log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
618
610
},
619
611
Body : "INFO: log line here" ,
0 commit comments