Skip to content

Commit

Permalink
fix: failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lasse-sap committed Nov 18, 2024
1 parent 95ed2f2 commit 37e0b87
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions internal/clients/entitlement/entitlement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,46 @@ func TestFilterAssignedServices(t *testing.T) {
err: nil,
},
},
"find service plan and unique ID": {
reason: "found by matching name",
args: args{
payload: &entclient.EntitledAndAssignedServicesResponseObject{
AssignedServices: []entclient.AssignedServiceResponseObject{
{

Name: internal.Ptr("postgresql-db"),
ServicePlans: []entclient.AssignedServicePlanResponseObject{
{
Name: internal.Ptr("default"),
UniqueIdentifier: internal.Ptr("postgresql-db-aws"),
AssignmentInfo: []entclient.AssignedServicePlanSubaccountDTO{
{
EntityId: internal.Ptr("0000-0000-0000-0000"),
},
},
},
},
},
},
},
servicePlan: "default",
serviceName: "postgresql-db",
cr: &v1alpha1.Entitlement{
Spec: v1alpha1.EntitlementSpec{
ForProvider: v1alpha1.EntitlementParameters{
SubaccountGuid: "0000-0000-0000-0000",
ServicePlanUniqueIdentifier: internal.Ptr("postgresql-db-aws"),
},
},
},
},
want: want{
o: &entclient.AssignedServicePlanSubaccountDTO{
EntityId: internal.Ptr("0000-0000-0000-0000"),
},
err: nil,
},
},
}

for name, tc := range cases {
Expand Down

0 comments on commit 37e0b87

Please sign in to comment.