@@ -422,7 +422,7 @@ func TestIssue10787(t *testing.T) {
422
422
assert .Equal (t , conf .ToStringMap (),
423
423
map [string ]any {
424
424
"exporters" : map [string ]any {
425
- "logging " : map [string ]any {
425
+ "debug " : map [string ]any {
426
426
"verbosity" : "detailed" ,
427
427
},
428
428
},
@@ -444,7 +444,7 @@ func TestIssue10787(t *testing.T) {
444
444
"service" : map [string ]any {
445
445
"pipelines" : map [string ]any {
446
446
"traces" : map [string ]any {
447
- "exporters" : []any {"logging " },
447
+ "exporters" : []any {"debug " },
448
448
"processors" : []any {"batch" },
449
449
"receivers" : []any {"otlp" },
450
450
},
@@ -462,16 +462,16 @@ func TestIssue10787(t *testing.T) {
462
462
func TestStructMappingIssue10787 (t * testing.T ) {
463
463
resolver := NewResolver (t , "types_expand.yaml" )
464
464
t .Setenv ("ENV" , `# this is a comment
465
- logging :
465
+ debug :
466
466
verbosity: detailed` )
467
467
conf , err := resolver .Resolve (context .Background ())
468
468
require .NoError (t , err )
469
469
470
- type Logging struct {
470
+ type Debug struct {
471
471
Verbosity string `mapstructure:"verbosity"`
472
472
}
473
473
type Exporters struct {
474
- Logging Logging `mapstructure:"logging "`
474
+ Debug Debug `mapstructure:"debug "`
475
475
}
476
476
type Target struct {
477
477
Field Exporters `mapstructure:"field"`
@@ -482,7 +482,7 @@ logging:
482
482
require .NoError (t , err )
483
483
require .Equal (t ,
484
484
Target {Field : Exporters {
485
- Logging : Logging {
485
+ Debug : Debug {
486
486
Verbosity : "detailed" ,
487
487
},
488
488
}},
@@ -495,7 +495,7 @@ logging:
495
495
err = confStr .Unmarshal (& cfgStr )
496
496
require .NoError (t , err )
497
497
require .Equal (t , `# this is a comment
498
- logging :
498
+ debug :
499
499
verbosity: detailed` ,
500
500
cfgStr .Field ,
501
501
)
@@ -505,16 +505,16 @@ func TestStructMappingIssue10787_ExpandComment(t *testing.T) {
505
505
resolver := NewResolver (t , "types_expand.yaml" )
506
506
t .Setenv ("EXPAND_ME" , "an expanded env var" )
507
507
t .Setenv ("ENV" , `# this is a comment with ${EXPAND_ME}
508
- logging :
508
+ debug :
509
509
verbosity: detailed` )
510
510
conf , err := resolver .Resolve (context .Background ())
511
511
require .NoError (t , err )
512
512
513
- type Logging struct {
513
+ type Debug struct {
514
514
Verbosity string `mapstructure:"verbosity"`
515
515
}
516
516
type Exporters struct {
517
- Logging Logging `mapstructure:"logging "`
517
+ Debug Debug `mapstructure:"debug "`
518
518
}
519
519
type Target struct {
520
520
Field Exporters `mapstructure:"field"`
@@ -525,7 +525,7 @@ logging:
525
525
require .NoError (t , err )
526
526
require .Equal (t ,
527
527
Target {Field : Exporters {
528
- Logging : Logging {
528
+ Debug : Debug {
529
529
Verbosity : "detailed" ,
530
530
},
531
531
}},
@@ -538,7 +538,7 @@ logging:
538
538
err = confStr .Unmarshal (& cfgStr )
539
539
require .NoError (t , err )
540
540
require .Equal (t , `# this is a comment with an expanded env var
541
- logging :
541
+ debug :
542
542
verbosity: detailed` ,
543
543
cfgStr .Field ,
544
544
)
0 commit comments