fix(s3): include EventBridgeConfiguration in GetBucketNotification response (#2072)

This commit is contained in:
Ron Yehuda authored and GitHub committed 2026-08-01 15:33:55 -05:00
1 parent f4e8bd8edf
commit b8edd37b0c
2 files changed
+17

No files matched your search

@@ -1438,6 +1438,9 @@ public class S3Controller {
appendFilterRules(xml, ln.filterRules());
xml.end("CloudFunctionConfiguration");
}
if (config.isEventBridgeEnabled()) {
xml.start("EventBridgeConfiguration").end("EventBridgeConfiguration");
}
xml.end("NotificationConfiguration");
return Response.ok(xml.build()).type(MediaType.APPLICATION_XML).build();
} catch (AwsException e) {
@@ -115,6 +115,13 @@ class S3EventBridgeIntegrationTest {
.put("/eb-s3-test-bucket?notification")
.then()
.statusCode(200);
given()
.when()
.get("/eb-s3-test-bucket?notification")
.then()
.statusCode(200)
.body(containsString("<EventBridgeConfiguration"));
}
@Test
@@ -185,6 +192,13 @@ class S3EventBridgeIntegrationTest {
.then()
.statusCode(200);
given()
.when()
.get("/eb-s3-test-bucket?notification")
.then()
.statusCode(200)
.body(not(containsString("EventBridgeConfiguration")));
// Drain any leftover messages
given()
.contentType("application/x-www-form-urlencoded")