mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(rds): reject malformed upgrade flags (#5329)
Reject malformed AutoMinorVersionUpgrade values before creating or modifying an instance, so invalid input cannot silently change its upgrade policy.
This commit is contained in:
1 parent
b6eeae92e1
commit
c8f16d2484
2 files changed
+24
-4
No files matched your search
@@ -59,6 +59,25 @@ class RdsQueryHandlerTest {
|
||||
handler = new RdsQueryHandler(service, config, docDbHandler, neptuneHandler);
|
||||
}
|
||||
|
||||
@Test
|
||||
void invalidAutoMinorVersionUpgradeIsRejectedBeforeCreateOrModify() {
|
||||
for (String action : List.of("CreateDBInstance", "ModifyDBInstance")) {
|
||||
MultivaluedMap<String, String> p = params();
|
||||
p.putSingle("DBInstanceIdentifier", "invalid-boolean");
|
||||
p.putSingle("Engine", "postgres");
|
||||
p.putSingle("MasterUsername", "admin");
|
||||
p.putSingle("MasterUserPassword", "password");
|
||||
p.putSingle("AutoMinorVersionUpgrade", "invalid");
|
||||
|
||||
Response response = handler.handle(action, p);
|
||||
|
||||
assertEquals(400, response.getStatus());
|
||||
assertTrue(((String) response.getEntity()).contains("<Code>InvalidParameterValue</Code>"));
|
||||
assertTrue(((String) response.getEntity()).contains("AutoMinorVersionUpgrade must be true or false."));
|
||||
verifyNoInteractions(service);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void describeEvents_reconcilesOnlyTheRequestedDbInstance() {
|
||||
DbInstance requested = makeInstance("requested");
|
||||
|
||||
Reference in new issue
Block a user