Skip to content

Commit

Permalink
Fix issue with empty JSON object responses from network policy endpoints
Browse files Browse the repository at this point in the history
[resolves #969]
  • Loading branch information
GFriedrich committed Aug 15, 2019
1 parent 080c92a commit 2dba29b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ public ReactorPolicies(ConnectionContext connectionContext, Mono<String> root, T

@Override
public Mono<Void> create(CreatePoliciesRequest request) {
return post(request, Void.class, builder -> builder.pathSegment("policies"))
return post(request, Object.class, builder -> builder.pathSegment("policies"))
.then()
.checkpoint();
}

@Override
public Mono<Void> delete(DeletePoliciesRequest request) {
return post(request, Void.class, builder -> builder.pathSegment("policies", "delete"))
return post(request, Object.class, builder -> builder.pathSegment("policies", "delete"))
.then()
.checkpoint();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public void create() {
.payload("fixtures/networking/policies/POST_request.json")
.build())
.response(TestResponse.builder()
.payload("fixtures/networking/policies/POST_response.json")
.status(OK)
.build())
.build());
Expand Down Expand Up @@ -95,6 +96,7 @@ public void delete() {
.payload("fixtures/networking/policies/POST_delete_request.json")
.build())
.response(TestResponse.builder()
.payload("fixtures/networking/policies/POST_delete_response.json")
.status(OK)
.build())
.build());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}

0 comments on commit 2dba29b

Please sign in to comment.