@@ -686,15 +686,16 @@ func (s *ServerTestSuite) Test_GetServicesFromEnvVars_ReturnsServices() {
686686 TimeoutTunnel : "my-TimeoutTunnel" ,
687687 ServiceDest : []proxy.ServiceDest {
688688 {
689- HttpsOnly : true ,
690- HttpsRedirectCode : "302" ,
691- OutboundHostname : "my-OutboundHostname" ,
692- Port : "1111" ,
693- ReqPathSearchReplace : "/something,/else" ,
694- ServiceDomain : []string {"my-domain-1.com" , "my-domain-2.com" },
695- ServicePath : []string {"my-path-11" , "my-path-12" },
696- SrcPort : 1112 ,
697- ReqMode : "my-ReqMode" ,
689+ HttpsOnly : true ,
690+ HttpsRedirectCode : "302" ,
691+ OutboundHostname : "my-OutboundHostname" ,
692+ Port : "1111" ,
693+ ReqPathSearchReplace : "/something,/else:/this,/that" ,
694+ ReqPathSearchReplaceFormatted : []string {"/something,/else" , "/this,/that" },
695+ ServiceDomain : []string {"my-domain-1.com" , "my-domain-2.com" },
696+ ServicePath : []string {"my-path-11" , "my-path-12" },
697+ SrcPort : 1112 ,
698+ ReqMode : "my-ReqMode" ,
698699 },
699700 },
700701 }
@@ -779,9 +780,10 @@ func (s *ServerTestSuite) Test_GetServicesFromEnvVars_SetsServiceDomainAlgoToHdr
779780 ServiceName : "my-ServiceName" ,
780781 ServiceDest : []proxy.ServiceDest {
781782 {
782- ServiceDomain : []string {"my-domain-1.com" , "my-domain-2.com" },
783- ServicePath : []string {"my-path-11" , "my-path-12" },
784- ReqMode : "http" ,
783+ ReqMode : "http" ,
784+ ReqPathSearchReplaceFormatted : []string {},
785+ ServiceDomain : []string {"my-domain-1.com" , "my-domain-2.com" },
786+ ServicePath : []string {"my-path-11" , "my-path-12" },
785787 },
786788 },
787789 ServiceDomainAlgo : "hdr_dom(host)" ,
@@ -809,18 +811,20 @@ func (s *ServerTestSuite) Test_GetServicesFromEnvVars_ReturnsServicesWithIndexed
809811 ServiceName : "my-ServiceName" ,
810812 ServiceDest : []proxy.ServiceDest {
811813 {
812- Port : "1111" ,
813- ReqPathSearchReplace : "/this,/that" ,
814- ServicePath : []string {"my-path-11" , "my-path-12" },
815- SrcPort : 1112 ,
816- HttpsOnly : true ,
814+ Port : "1111" ,
815+ ReqPathSearchReplace : "/this,/that" ,
816+ ReqPathSearchReplaceFormatted : []string {"/this,/that" },
817+ ServicePath : []string {"my-path-11" , "my-path-12" },
818+ SrcPort : 1112 ,
819+ HttpsOnly : true ,
817820 }, {
818- Port : "2221" ,
819- ReqPathSearchReplace : "/something,/else" ,
820- ServicePath : []string {"my-path-21" , "my-path-22" },
821- SrcPort : 2222 ,
822- HttpsOnly : false ,
823- OutboundHostname : "my-outbound-domain.com" ,
821+ Port : "2221" ,
822+ ReqPathSearchReplace : "/something,/else" ,
823+ ReqPathSearchReplaceFormatted : []string {"/something,/else" },
824+ ServicePath : []string {"my-path-21" , "my-path-22" },
825+ SrcPort : 2222 ,
826+ HttpsOnly : false ,
827+ OutboundHostname : "my-outbound-domain.com" ,
824828 },
825829 },
826830 }
@@ -872,11 +876,12 @@ func (s *ServerTestSuite) Test_GetServicesFromEnvVars_ReturnsMultipleServices()
872876 ServiceName : "my-ServiceName" ,
873877 ServiceDest : []proxy.ServiceDest {
874878 {
875- Port : "1111" ,
876- ServiceDomain : []string {},
877- ServicePath : []string {"my-path-11" , "my-path-12" },
878- SrcPort : 1112 ,
879- ReqMode : "http" ,
879+ Port : "1111" ,
880+ ReqPathSearchReplaceFormatted : []string {},
881+ ServiceDomain : []string {},
882+ ServicePath : []string {"my-path-11" , "my-path-12" },
883+ SrcPort : 1112 ,
884+ ReqMode : "http" ,
880885 },
881886 },
882887 }
0 commit comments