mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(rds): fix DBSubnetGroup shape, non-master auth pass-through, and volume lifecycle (#604)
* fix(rds): fix DBSubnetGroup shape, non-master auth pass-through, and volume lifecycle (#548, #503, #567) * fix(rds): fix wrong storage value and docs * fix(rds): fix master password check
This commit is contained in:
1 parent
c7987ad1de
commit
eeedfe09a2
17 files changed
+445
-63
No files matched your search
@@ -215,6 +215,23 @@ class RdsQueryHandlerTest {
|
||||
assertTrue(((String) response.getEntity()).contains("UnsupportedOperation"));
|
||||
}
|
||||
|
||||
// ──────────────────────────── DBSubnetGroup shape ───────────────────────────
|
||||
|
||||
@Test
|
||||
void describeDbClusters_dbSubnetGroupIsPlainString() {
|
||||
DbCluster cluster = makeCluster("mycluster");
|
||||
when(service.listDbClusters(null)).thenReturn(List.of(cluster));
|
||||
|
||||
Response response = handler.handle("DescribeDBClusters", params());
|
||||
|
||||
String body = (String) response.getEntity();
|
||||
// DBCluster.DBSubnetGroup is shape: String in the AWS service model — not a nested struct
|
||||
assertTrue(body.contains("<DBSubnetGroup>default</DBSubnetGroup>"),
|
||||
"Expected DBSubnetGroup as plain string element");
|
||||
assertFalse(body.contains("<DBSubnetGroupName>"),
|
||||
"Did not expect nested DBSubnetGroupName inside DBCluster");
|
||||
}
|
||||
|
||||
// ──────────────────────────── Helpers ────────────────────────────
|
||||
|
||||
private static MultivaluedMap<String, String> params() {
|
||||
|
||||
@@ -3,6 +3,7 @@ package io.github.hectorvent.floci.services.rds;
|
||||
import io.github.hectorvent.floci.config.EmulatorConfig;
|
||||
import io.github.hectorvent.floci.core.common.AwsException;
|
||||
import io.github.hectorvent.floci.core.common.RegionResolver;
|
||||
import io.github.hectorvent.floci.core.common.ServiceConfigAccess;
|
||||
import io.github.hectorvent.floci.services.rds.model.DatabaseEngine;
|
||||
import io.github.hectorvent.floci.services.rds.model.DbCluster;
|
||||
import io.github.hectorvent.floci.services.rds.container.RdsContainerHandle;
|
||||
@@ -42,7 +43,9 @@ class RdsServiceTest {
|
||||
when(rdsConfig.proxyBasePort()).thenReturn(7000);
|
||||
when(rdsConfig.proxyMaxPort()).thenReturn(7099);
|
||||
|
||||
rdsService = new RdsService(containerManager, proxyManager, regionResolver, config);
|
||||
ServiceConfigAccess serviceConfigAccess = mock(ServiceConfigAccess.class);
|
||||
when(serviceConfigAccess.storageMode("rds")).thenReturn("in-memory");
|
||||
rdsService = new RdsService(containerManager, proxyManager, regionResolver, config, serviceConfigAccess);
|
||||
|
||||
when(containerManager.start(any(), any(), any(), any(), any(), any()))
|
||||
.thenReturn(new RdsContainerHandle("cont-id", "id", "localhost", 5432));
|
||||
|
||||
Reference in new issue
Block a user