Skip to content

Commit

Permalink
feature: update API for Kessel Inventory's client
Browse files Browse the repository at this point in the history
The back end requested a "workspace_id" field that was not present in
the client's API. It turns out they needed to update the client, and in
turn, we needed to update our implementation too.

RHCLOUD-34485
  • Loading branch information
MikelAlejoBR committed Nov 14, 2024
1 parent 3bbb38e commit 2e392a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ protected CreateNotificationsIntegrationRequest buildCreateIntegrationRequest(fi
NotificationsIntegration.newBuilder()
.setMetadata(Metadata.newBuilder()
.setResourceType(ResourceType.INTEGRATION.getKesselRepresentation())
.setWorkspace(workspaceId)
.setWorkspaceId(workspaceId)
.build()
).setReporterData(ReporterData.newBuilder()
.setLocalResourceId(integrationId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void testBuildCreateIntegrationRequest() {
// Assert that the request was properly built.
final Metadata metadata = request.getIntegration().getMetadata();
Assertions.assertEquals(ResourceType.INTEGRATION.getKesselRepresentation(), metadata.getResourceType(), "the \"resource type\" should have been an integration");
Assertions.assertEquals(workspaceId, metadata.getWorkspace(), "the workspace ID was incorrectly set");
Assertions.assertEquals(workspaceId, metadata.getWorkspaceId(), "the workspace ID was incorrectly set");

final ReporterData reporterData = request.getIntegration().getReporterData();
Assertions.assertEquals(integrationId, reporterData.getLocalResourceId(), "the \"local resource id\" was incorrectly set");
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<properties>
<mapstruct.version>1.6.2</mapstruct.version>
<kessel.inventory-client.version>0.5</kessel.inventory-client.version>
<kessel.inventory-client.version>0.7</kessel.inventory-client.version>
<kessel.oauth-client.version>11.20.1</kessel.oauth-client.version>
<kessel.relationships-client.version>0.10</kessel.relationships-client.version>

Expand Down

0 comments on commit 2e392a5

Please sign in to comment.