mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
Add RDS provisioning support (#1253)
* feat(rds): add subnet groups and orderable options * feat(rds): support subnet group modification * feat(rds): return managed master user secrets * fix(rds): preserve instance tags * fix(rds): honor requested engine versions * fix(rds): return routable proxy endpoints * fix(rds): accept PostgreSQL SSL negotiation * fix(rds): initialize PostgreSQL IAM role * fix(rds): include PostgreSQL 18 orderable option * fix(rds): address provisioning support review feedback
This commit is contained in:
1 parent
59a2659e41
commit
22a50b3c80
13 files changed
+1329
-58
No files matched your search
+55
@@ -0,0 +1,55 @@
|
||||
package com.floci.test;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import software.amazon.awssdk.services.rds.RdsClient;
|
||||
import software.amazon.awssdk.services.rds.model.CreateDbSubnetGroupResponse;
|
||||
import software.amazon.awssdk.services.rds.model.DescribeDbSubnetGroupsResponse;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@DisplayName("RDS Control Plane")
|
||||
class RdsControlPlaneTest {
|
||||
|
||||
private static RdsClient rds;
|
||||
private static String subnetGroupName;
|
||||
|
||||
@BeforeAll
|
||||
static void setup() {
|
||||
rds = TestFixtures.rdsClient();
|
||||
subnetGroupName = TestFixtures.uniqueName("rds-subnets");
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
static void cleanup() {
|
||||
if (rds != null) {
|
||||
try {
|
||||
rds.deleteDBSubnetGroup(b -> b.dbSubnetGroupName(subnetGroupName));
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
rds.close();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void sdkUnmarshalsDbSubnetGroupSubnets() {
|
||||
CreateDbSubnetGroupResponse createResponse = rds.createDBSubnetGroup(b -> b
|
||||
.dbSubnetGroupName(subnetGroupName)
|
||||
.dbSubnetGroupDescription("SDK subnet group shape")
|
||||
.subnetIds("subnet-a", "subnet-b"));
|
||||
|
||||
assertThat(createResponse.dbSubnetGroup().subnets())
|
||||
.extracting("subnetIdentifier")
|
||||
.containsExactly("subnet-a", "subnet-b");
|
||||
|
||||
DescribeDbSubnetGroupsResponse describeResponse = rds.describeDBSubnetGroups(b -> b
|
||||
.dbSubnetGroupName(subnetGroupName));
|
||||
|
||||
assertThat(describeResponse.dbSubnetGroups()).hasSize(1);
|
||||
assertThat(describeResponse.dbSubnetGroups().get(0).subnets())
|
||||
.extracting("subnetIdentifier")
|
||||
.containsExactly("subnet-a", "subnet-b");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user