diff --git a/src/main/java/io/github/hectorvent/floci/services/elbv2/ElbV2QueryHandler.java b/src/main/java/io/github/hectorvent/floci/services/elbv2/ElbV2QueryHandler.java index bd94b10688..cb4562cafa 100644 --- a/src/main/java/io/github/hectorvent/floci/services/elbv2/ElbV2QueryHandler.java +++ b/src/main/java/io/github/hectorvent/floci/services/elbv2/ElbV2QueryHandler.java @@ -339,7 +339,8 @@ public class ElbV2QueryHandler { private Response handleDeleteTargetGroup(MultivaluedMap p, String region) { String arn = p.getFirst("TargetGroupArn"); service.deleteTargetGroup(region, arn); - return voidResponse("DeleteTargetGroupResponse"); + String xml = AwsQueryResponse.envelopeEmptyResult("DeleteTargetGroup", AwsNamespaces.ELB_V2); + return Response.ok(xml).type(MediaType.APPLICATION_XML).build(); } private Response handleModifyTargetGroup(MultivaluedMap p, String region) { diff --git a/src/test/java/io/github/hectorvent/floci/services/elbv2/ElbV2IntegrationTest.java b/src/test/java/io/github/hectorvent/floci/services/elbv2/ElbV2IntegrationTest.java index 90b3bb72a1..90bf2c685c 100644 --- a/src/test/java/io/github/hectorvent/floci/services/elbv2/ElbV2IntegrationTest.java +++ b/src/test/java/io/github/hectorvent/floci/services/elbv2/ElbV2IntegrationTest.java @@ -662,6 +662,21 @@ class ElbV2IntegrationTest { @Test @Order(72) + void deleteTargetGroupIncludesEmptyResult() { + given() + .formParam("Action", "DeleteTargetGroup") + .formParam("TargetGroupArn", tgArn) + .header("Authorization", AUTH) + .when() + .post("/") + .then() + .statusCode(200) + .body(containsString("