@@ -189,7 +189,7 @@ func (s) TestServerSideXDS_RouteConfiguration(t *testing.T) {
189189 {
190190 Name : "filter-1" ,
191191 ConfigType : & v3listenerpb.Filter_TypedConfig {
192- TypedConfig : testutils .MarshalAny (& v3httppb.HttpConnectionManager {
192+ TypedConfig : testutils .MarshalAny (t , & v3httppb.HttpConnectionManager {
193193 HttpFilters : []* v3httppb.HttpFilter {e2e .HTTPFilter ("router" , & v3routerpb.Router {})},
194194 RouteSpecifier : & v3httppb.HttpConnectionManager_RouteConfig {
195195 RouteConfig : & v3routepb.RouteConfiguration {
@@ -227,7 +227,7 @@ func (s) TestServerSideXDS_RouteConfiguration(t *testing.T) {
227227 {
228228 Name : "filter-1" ,
229229 ConfigType : & v3listenerpb.Filter_TypedConfig {
230- TypedConfig : testutils .MarshalAny (& v3httppb.HttpConnectionManager {
230+ TypedConfig : testutils .MarshalAny (t , & v3httppb.HttpConnectionManager {
231231 HttpFilters : []* v3httppb.HttpFilter {e2e .HTTPFilter ("router" , & v3routerpb.Router {})},
232232 RouteSpecifier : & v3httppb.HttpConnectionManager_RouteConfig {
233233 RouteConfig : & v3routepb.RouteConfiguration {
@@ -299,7 +299,7 @@ func (s) TestServerSideXDS_RouteConfiguration(t *testing.T) {
299299
300300// serverListenerWithRBACHTTPFilters returns an xds Listener resource with HTTP Filters defined in the HCM, and a route
301301// configuration that always matches to a route and a VH.
302- func serverListenerWithRBACHTTPFilters (host string , port uint32 , rbacCfg * rpb.RBAC ) * v3listenerpb.Listener {
302+ func serverListenerWithRBACHTTPFilters (t * testing. T , host string , port uint32 , rbacCfg * rpb.RBAC ) * v3listenerpb.Listener {
303303 // Rather than declare typed config inline, take a HCM proto and append the
304304 // RBAC Filters to it.
305305 hcm := & v3httppb.HttpConnectionManager {
@@ -317,7 +317,7 @@ func serverListenerWithRBACHTTPFilters(host string, port uint32, rbacCfg *rpb.RB
317317 // This tests override parsing + building when RBAC Filter
318318 // passed both normal and override config.
319319 TypedPerFilterConfig : map [string ]* anypb.Any {
320- "rbac" : testutils .MarshalAny (& rpb.RBACPerRoute {Rbac : rbacCfg }),
320+ "rbac" : testutils .MarshalAny (t , & rpb.RBACPerRoute {Rbac : rbacCfg }),
321321 },
322322 }}},
323323 },
@@ -364,7 +364,7 @@ func serverListenerWithRBACHTTPFilters(host string, port uint32, rbacCfg *rpb.RB
364364 {
365365 Name : "filter-1" ,
366366 ConfigType : & v3listenerpb.Filter_TypedConfig {
367- TypedConfig : testutils .MarshalAny (hcm ),
367+ TypedConfig : testutils .MarshalAny (t , hcm ),
368368 },
369369 },
370370 },
@@ -394,7 +394,7 @@ func serverListenerWithRBACHTTPFilters(host string, port uint32, rbacCfg *rpb.RB
394394 {
395395 Name : "filter-1" ,
396396 ConfigType : & v3listenerpb.Filter_TypedConfig {
397- TypedConfig : testutils .MarshalAny (hcm ),
397+ TypedConfig : testutils .MarshalAny (t , hcm ),
398398 },
399399 },
400400 },
@@ -656,7 +656,7 @@ func (s) TestRBACHTTPFilter(t *testing.T) {
656656 Port : port ,
657657 SecLevel : e2e .SecurityLevelNone ,
658658 })
659- inboundLis := serverListenerWithRBACHTTPFilters (host , port , test .rbacCfg )
659+ inboundLis := serverListenerWithRBACHTTPFilters (t , host , port , test .rbacCfg )
660660 resources .Listeners = append (resources .Listeners , inboundLis )
661661
662662 ctx , cancel := context .WithTimeout (context .Background (), defaultTestTimeout )
@@ -712,7 +712,7 @@ func (s) TestRBACHTTPFilter(t *testing.T) {
712712// serverListenerWithBadRouteConfiguration returns an xds Listener resource with
713713// a Route Configuration that will never successfully match in order to test
714714// RBAC Environment variable being toggled on and off.
715- func serverListenerWithBadRouteConfiguration (host string , port uint32 ) * v3listenerpb.Listener {
715+ func serverListenerWithBadRouteConfiguration (t * testing. T , host string , port uint32 ) * v3listenerpb.Listener {
716716 return & v3listenerpb.Listener {
717717 Name : fmt .Sprintf (e2e .ServerListenerResourceNameTemplate , net .JoinHostPort (host , strconv .Itoa (int (port )))),
718718 Address : & v3corepb.Address {
@@ -751,7 +751,7 @@ func serverListenerWithBadRouteConfiguration(host string, port uint32) *v3listen
751751 {
752752 Name : "filter-1" ,
753753 ConfigType : & v3listenerpb.Filter_TypedConfig {
754- TypedConfig : testutils .MarshalAny (& v3httppb.HttpConnectionManager {
754+ TypedConfig : testutils .MarshalAny (t , & v3httppb.HttpConnectionManager {
755755 RouteSpecifier : & v3httppb.HttpConnectionManager_RouteConfig {
756756 RouteConfig : & v3routepb.RouteConfiguration {
757757 Name : "routeName" ,
@@ -799,7 +799,7 @@ func serverListenerWithBadRouteConfiguration(host string, port uint32) *v3listen
799799 {
800800 Name : "filter-1" ,
801801 ConfigType : & v3listenerpb.Filter_TypedConfig {
802- TypedConfig : testutils .MarshalAny (& v3httppb.HttpConnectionManager {
802+ TypedConfig : testutils .MarshalAny (t , & v3httppb.HttpConnectionManager {
803803 RouteSpecifier : & v3httppb.HttpConnectionManager_RouteConfig {
804804 RouteConfig : & v3routepb.RouteConfiguration {
805805 Name : "routeName" ,
@@ -858,7 +858,7 @@ func (s) TestRBACToggledOn_WithBadRouteConfiguration(t *testing.T) {
858858 // Since RBAC support is turned ON, all the RPC's should get denied with
859859 // status code Unavailable due to not matching to a route of type Non
860860 // Forwarding Action (Route Table not configured properly).
861- inboundLis := serverListenerWithBadRouteConfiguration (host , port )
861+ inboundLis := serverListenerWithBadRouteConfiguration (t , host , port )
862862 resources .Listeners = append (resources .Listeners , inboundLis )
863863
864864 ctx , cancel := context .WithTimeout (context .Background (), defaultTestTimeout )
@@ -915,7 +915,7 @@ func (s) TestRBACToggledOff_WithBadRouteConfiguration(t *testing.T) {
915915 // This bad route configuration shouldn't affect incoming RPC's from
916916 // proceeding as normal, as the configuration shouldn't be parsed due to the
917917 // RBAC Environment variable not being set to true.
918- inboundLis := serverListenerWithBadRouteConfiguration (host , port )
918+ inboundLis := serverListenerWithBadRouteConfiguration (t , host , port )
919919 resources .Listeners = append (resources .Listeners , inboundLis )
920920
921921 ctx , cancel := context .WithTimeout (context .Background (), defaultTestTimeout )
0 commit comments