@@ -619,17 +619,24 @@ func TestOBIConfigConversion(t *testing.T) {
619619 cfg := DefaultConfig ()
620620 cfg .Prometheus .Port = 6060
621621 cfg .Metrics .MetricsEndpoint = "http://localhost:4318"
622+ cfg .NetworkFlows .Enable = true
623+ cfg .Attributes .Kubernetes .Enable = kubeflags .EnabledTrue
624+ cfg .Attributes .HostID .Override = "test-instance-id"
625+ cfg .ServiceName = "test-service"
622626 cfg .Discovery = servicesextra.BeylaDiscoveryConfig {
623627 Instrument : services.GlobDefinitionCriteria {
624628 {Path : services .NewGlob ("hello*" )},
625629 {Path : services .NewGlob ("bye*" )},
626630 },
627631 }
628632
629- // TODO: add more fields that you want to verify they are properly converted
630633 dst := cfg .AsOBI ()
631634 assert .Equal (t , dst .Prometheus .Port , 6060 )
632635 assert .Equal (t , dst .Metrics .MetricsEndpoint , "http://localhost:4318" )
636+ assert .True (t , dst .NetworkFlows .Enable )
637+ assert .Equal (t , kubeflags .EnabledTrue , dst .Attributes .Kubernetes .Enable )
638+ assert .Equal (t , "test-instance-id" , dst .Attributes .HostID .Override )
639+ assert .Equal (t , "test-service" , dst .ServiceName )
633640 assert .Equal (t ,
634641 services.GlobDefinitionCriteria {
635642 {Path : services .NewGlob ("hello*" )},
0 commit comments