mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(mq): route DescribeSharedResources (#5356)
* fix(mq): route DescribeSharedResources
GET /v1/brokers/{broker-id}/shared-resources was unrouted and fell through
to S3 (NoSuchBucket). Return an empty sharedResources list for an existing
broker, NotFoundException for an unknown one.
* docs(mq): say why DescribeSharedResources is always empty
Floci does have resource shares (RAM); what keeps the list empty is
that a share reaches a broker only through UpdateBroker's
resourceShareArns, and Floci has no UpdateBroker.
This commit is contained in:
1 parent
ae75a653d6
commit
d1fe27cb92
3 files changed
+33
No files matched your search
+23
@@ -150,6 +150,29 @@ class AmazonMqControllerIntegrationTest {
|
||||
.statusCode(400);
|
||||
}
|
||||
|
||||
@Test
|
||||
void describeSharedResourcesReturnsEmptyList() {
|
||||
String brokerId = createRabbitBroker("it-shared");
|
||||
|
||||
given()
|
||||
.when()
|
||||
.get("/v1/brokers/{id}/shared-resources", brokerId)
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body("sharedResources", equalTo(List.of()))
|
||||
.body("$", not(hasKey("nextToken")));
|
||||
}
|
||||
|
||||
@Test
|
||||
void describeSharedResourcesUnknownBrokerIsNotFound() {
|
||||
given()
|
||||
.when()
|
||||
.get("/v1/brokers/{id}/shared-resources", "b-does-not-exist")
|
||||
.then()
|
||||
.statusCode(404)
|
||||
.body("__type", equalTo("NotFoundException"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void rejectsBrokerWithoutUser() {
|
||||
given()
|
||||
|
||||
Reference in new issue
Block a user