Skip to content

Commit

Permalink
Fixes gatewayproxy controller tests for ent (#20543)
Browse files Browse the repository at this point in the history
fix tests for ent
  • Loading branch information
jm96441n authored Feb 8, 2024
1 parent b262825 commit 7c3a379
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (suite *gatewayproxyControllerSuite) TestReconciler_Reconcile() {

require.NoError(t, err)

dec, err := resource.GetDecodedResource[*types.DecodedProxyStateTemplate](ctx, suite.client, id)
dec, err := resource.GetDecodedResource[*pbmesh.ProxyStateTemplate](ctx, suite.client, id)
require.NoError(t, err)
require.Nil(t, dec)
})
Expand Down Expand Up @@ -115,6 +115,7 @@ func (suite *gatewayproxyControllerSuite) TestReconciler_Reconcile() {

dec, err := resource.GetDecodedResource[*pbmesh.ProxyStateTemplate](ctx, suite.client, id)
require.NoError(t, err)
require.NotNil(t, dec)
require.Equal(t, dec.Id.Name, expectedWrittenResource.Id.Name)
require.Equal(t, dec.Metadata, expectedWrittenResource.Metadata)
require.Equal(t, dec.Owner.Name, expectedWrittenResource.Owner.Name)
Expand Down Expand Up @@ -224,7 +225,7 @@ func (suite *gatewayproxyControllerSuite) setupSuiteWithTenancy(tenancy *pbresou
Resource: &pbresource.Resource{
Id: &pbresource.ID{
Name: "mesh-gateway",
Tenancy: meshGWTenancy,
Tenancy: tenancy,
},
Metadata: map[string]string{
GatewayKindMetadataKey: meshgateways.GatewayKind,
Expand All @@ -234,7 +235,7 @@ func (suite *gatewayproxyControllerSuite) setupSuiteWithTenancy(tenancy *pbresou

resourcetest.Resource(pbcatalog.WorkloadType, "mesh-gateway").
WithData(suite.T(), suite.meshgwWorkload.Data).
WithTenancy(meshGWTenancy).
WithTenancy(tenancy).
WithMeta(GatewayKindMetadataKey, meshgateways.GatewayKind).
Write(suite.T(), suite.client)

Expand Down

0 comments on commit 7c3a379

Please sign in to comment.