mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(rds): report DB parameter group attachments (#1392)
This commit is contained in:
1 parent
b599646785
commit
892f9f7fb8
2 files changed
+69
No files matched your search
@@ -54,6 +54,34 @@ class RdsQueryHandlerTest {
|
||||
assertFalse(body.contains("<member><DBInstanceIdentifier>"), "Did not expect <member> wrapping DBInstance");
|
||||
}
|
||||
|
||||
@Test
|
||||
void describeDbInstances_includesDbParameterGroupAttachment() {
|
||||
DbInstance instance = makeInstance("mydb");
|
||||
instance.setParameterGroupName("postgres18");
|
||||
when(service.listDbInstances(null)).thenReturn(List.of(instance));
|
||||
|
||||
Response response = handler.handle("DescribeDBInstances", params());
|
||||
|
||||
String body = (String) response.getEntity();
|
||||
assertTrue(body.contains("<DBParameterGroups>"));
|
||||
assertTrue(body.contains("<DBParameterGroupName>postgres18</DBParameterGroupName>"));
|
||||
assertTrue(body.contains("<ParameterApplyStatus>in-sync</ParameterApplyStatus>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void describeDbInstances_reportsDefaultDbParameterGroupWhenUnattached() {
|
||||
DbInstance instance = makeInstance("mydb");
|
||||
instance.setEngineVersion("16.3");
|
||||
when(service.listDbInstances(null)).thenReturn(List.of(instance));
|
||||
|
||||
Response response = handler.handle("DescribeDBInstances", params());
|
||||
|
||||
String body = (String) response.getEntity();
|
||||
assertTrue(body.contains("<DBParameterGroups>"));
|
||||
assertTrue(body.contains("<DBParameterGroupName>default.postgres16</DBParameterGroupName>"));
|
||||
assertTrue(body.contains("<ParameterApplyStatus>in-sync</ParameterApplyStatus>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void describeDbInstances_filterByDirectIdentifier() {
|
||||
DbInstance instance = makeInstance("mydb");
|
||||
|
||||
Reference in new issue
Block a user