File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -592,3 +592,23 @@ func TestUpdateEntityMetadata(t *testing.T) {
592
592
updateEntityMetadata (entity , labels )
593
593
assert .Equal (t , expected , entity )
594
594
}
595
+ func TestUpdateEntityMetadata_NilLabels (t * testing.T ) {
596
+ t .Parallel ()
597
+ expected := & entity.Fields {
598
+ Name : "WIN_SERVICE:testWindows:newrelic-infra" ,
599
+ Type : "WIN_SERVICE" ,
600
+ IDAttributes : nil ,
601
+ DisplayName : "New Relic Infrastructure Agent" ,
602
+ Metadata : map [string ]interface {}{},
603
+ }
604
+ var labels map [string ]string
605
+ entity := & entity.Fields {
606
+ Name : "WIN_SERVICE:testWindows:newrelic-infra" ,
607
+ Type : "WIN_SERVICE" ,
608
+ IDAttributes : nil ,
609
+ DisplayName : "New Relic Infrastructure Agent" ,
610
+ Metadata : map [string ]interface {}{},
611
+ }
612
+ updateEntityMetadata (entity , labels )
613
+ assert .Equal (t , expected , entity )
614
+ }
You can’t perform that action at this time.
0 commit comments