diff --git a/internal/mesh/internal/controllers/sidecarproxy/controller_test.go b/internal/mesh/internal/controllers/sidecarproxy/controller_test.go index ac15370ccb..384f14e6bf 100644 --- a/internal/mesh/internal/controllers/sidecarproxy/controller_test.go +++ b/internal/mesh/internal/controllers/sidecarproxy/controller_test.go @@ -566,8 +566,8 @@ func (suite *controllerTestSuite) TestController() { // Run the controller manager var ( // Create proxy state template IDs to check against in this test. - apiProxyStateTemplateID = resourcetest.ResourceWithTenancy(pbmesh.ProxyStateTemplateType, "api-abc", tenancy).ID() - webProxyStateTemplateID = resourcetest.ResourceWithTenancy(pbmesh.ProxyStateTemplateType, "web-def", tenancy).ID() + apiProxyStateTemplateID = resourcetest.Resource(pbmesh.ProxyStateTemplateType, "api-abc").WithTenancy(tenancy).ID() + webProxyStateTemplateID = resourcetest.Resource(pbmesh.ProxyStateTemplateType, "web-def").WithTenancy(tenancy).ID() apiComputedRoutesID = resource.ReplaceType(pbmesh.ComputedRoutesType, suite.apiService.Id) dbComputedRoutesID = resource.ReplaceType(pbmesh.ComputedRoutesType, suite.dbService.Id) diff --git a/internal/resource/resourcetest/builder.go b/internal/resource/resourcetest/builder.go index 0379a47659..423bd66aaa 100644 --- a/internal/resource/resourcetest/builder.go +++ b/internal/resource/resourcetest/builder.go @@ -43,22 +43,6 @@ func Resource(rtype *pbresource.Type, name string) *resourceBuilder { } } -func ResourceWithTenancy(rtype *pbresource.Type, name string, tenancy *pbresource.Tenancy) *resourceBuilder { - return &resourceBuilder{ - resource: &pbresource.Resource{ - Id: &pbresource.ID{ - Type: &pbresource.Type{ - Group: rtype.Group, - GroupVersion: rtype.GroupVersion, - Kind: rtype.Kind, - }, - Name: name, - Tenancy: tenancy, - }, - }, - } -} - func ResourceID(id *pbresource.ID) *resourceBuilder { return &resourceBuilder{ resource: &pbresource.Resource{