@@ -371,9 +371,9 @@ func hundredFlows() []config.GenericMap {
371371
372372func TestGRPCClientCreation (t * testing.T ) {
373373 params := api.WriteLoki {
374- URL : "localhost:9095" ,
374+ URL : "localhost:9095" ,
375375 ClientProtocol : "grpc" ,
376- TenantID : "test-tenant" ,
376+ TenantID : "test-tenant" ,
377377 GRPCConfig : & api.GRPCLokiConfig {
378378 KeepAlive : "30s" ,
379379 KeepAliveTimeout : "5s" ,
@@ -388,9 +388,9 @@ func TestGRPCClientCreation(t *testing.T) {
388388
389389func TestGRPCClientCreationWithTLS (t * testing.T ) {
390390 params := api.WriteLoki {
391- URL : "loki.example.com:9095" ,
391+ URL : "loki.example.com:9095" ,
392392 ClientProtocol : "grpc" ,
393- TenantID : "test-tenant" ,
393+ TenantID : "test-tenant" ,
394394 GRPCConfig : & api.GRPCLokiConfig {
395395 KeepAlive : "30s" ,
396396 KeepAliveTimeout : "5s" ,
@@ -422,15 +422,15 @@ func TestBuildGRPCLokiConfig(t *testing.T) {
422422 {
423423 name : "valid basic gRPC config" ,
424424 input : & api.WriteLoki {
425- URL : "localhost:9095" ,
425+ URL : "localhost:9095" ,
426426 ClientProtocol : "grpc" ,
427- BatchWait : "2s" ,
428- BatchSize : 50000 ,
429- Timeout : "15s" ,
430- MinBackoff : "2s" ,
431- MaxBackoff : "10s" ,
432- MaxRetries : 5 ,
433- TenantID : "test-tenant" ,
427+ BatchWait : "2s" ,
428+ BatchSize : 50000 ,
429+ Timeout : "15s" ,
430+ MinBackoff : "2s" ,
431+ MaxBackoff : "10s" ,
432+ MaxRetries : 5 ,
433+ TenantID : "test-tenant" ,
434434 GRPCConfig : & api.GRPCLokiConfig {
435435 KeepAlive : "60s" ,
436436 KeepAliveTimeout : "10s" ,
@@ -445,21 +445,21 @@ func TestBuildGRPCLokiConfig(t *testing.T) {
445445 {
446446 name : "missing gRPC config" ,
447447 input : & api.WriteLoki {
448- URL : "localhost:9095" ,
448+ URL : "localhost:9095" ,
449449 ClientProtocol : "grpc" ,
450- TenantID : "test-tenant" ,
451- GRPCConfig : nil ,
450+ TenantID : "test-tenant" ,
451+ GRPCConfig : nil ,
452452 },
453453 wantErr : true ,
454454 },
455455 {
456456 name : "invalid duration in gRPC config" ,
457457 input : & api.WriteLoki {
458- URL : "localhost:9095" ,
458+ URL : "localhost:9095" ,
459459 ClientProtocol : "grpc" ,
460- BatchWait : "invalid-duration" ,
461- TenantID : "test-tenant" ,
462- GRPCConfig : & api.GRPCLokiConfig {},
460+ BatchWait : "invalid-duration" ,
461+ TenantID : "test-tenant" ,
462+ GRPCConfig : & api.GRPCLokiConfig {},
463463 },
464464 wantErr : true ,
465465 },
@@ -554,27 +554,27 @@ func TestWriteLokiValidation(t *testing.T) {
554554 {
555555 name : "valid HTTP config" ,
556556 config : & api.WriteLoki {
557- URL : "http://localhost:3100" ,
557+ URL : "http://localhost:3100" ,
558558 ClientProtocol : "http" ,
559- BatchSize : 1024 ,
559+ BatchSize : 1024 ,
560560 },
561561 wantErr : false ,
562562 },
563563 {
564564 name : "valid gRPC config" ,
565565 config : & api.WriteLoki {
566- URL : "localhost:9095" ,
566+ URL : "localhost:9095" ,
567567 ClientProtocol : "grpc" ,
568- BatchSize : 1024 ,
569- GRPCConfig : & api.GRPCLokiConfig {},
568+ BatchSize : 1024 ,
569+ GRPCConfig : & api.GRPCLokiConfig {},
570570 },
571571 wantErr : false ,
572572 },
573573 {
574574 name : "invalid client type" ,
575575 config : & api.WriteLoki {
576576 ClientProtocol : "websocket" ,
577- BatchSize : 1024 ,
577+ BatchSize : 1024 ,
578578 },
579579 wantErr : true ,
580580 errMsg : "invalid clientProtocol" ,
@@ -583,7 +583,7 @@ func TestWriteLokiValidation(t *testing.T) {
583583 name : "missing URL for HTTP" ,
584584 config : & api.WriteLoki {
585585 ClientProtocol : "http" ,
586- BatchSize : 1024 ,
586+ BatchSize : 1024 ,
587587 },
588588 wantErr : true ,
589589 errMsg : "url can't be empty" ,
@@ -592,28 +592,28 @@ func TestWriteLokiValidation(t *testing.T) {
592592 name : "missing URL for gRPC" ,
593593 config : & api.WriteLoki {
594594 ClientProtocol : "grpc" ,
595- BatchSize : 1024 ,
596- GRPCConfig : & api.GRPCLokiConfig {},
595+ BatchSize : 1024 ,
596+ GRPCConfig : & api.GRPCLokiConfig {},
597597 },
598598 wantErr : true ,
599599 errMsg : "url can't be empty" ,
600600 },
601601 {
602602 name : "missing gRPC config" ,
603603 config : & api.WriteLoki {
604- URL : "localhost:9095" ,
604+ URL : "localhost:9095" ,
605605 ClientProtocol : "grpc" ,
606- BatchSize : 1024 ,
606+ BatchSize : 1024 ,
607607 },
608608 wantErr : true ,
609609 errMsg : "grpcConfig is required" ,
610610 },
611611 {
612612 name : "invalid batch size" ,
613613 config : & api.WriteLoki {
614- URL : "http://localhost:3100" ,
614+ URL : "http://localhost:3100" ,
615615 ClientProtocol : "http" ,
616- BatchSize : - 1 ,
616+ BatchSize : - 1 ,
617617 },
618618 wantErr : true ,
619619 errMsg : "invalid batchSize" ,
0 commit comments