mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
feat(rds): refuse role feature names the engine does not support (#5637)
* feat(rds): refuse role feature names the engine does not support AddRoleToDBInstance, AddRoleToDBCluster and CreateDBCluster AssociatedRoles stored any FeatureName, so Lambda on a MySQL instance was accepted although MySQL supports no role features. A FeatureName now has to be one the engine lists in SupportedFeatureNames, matched without regard to case, or the call is InvalidParameterValue; CreateDBCluster refuses before any cluster exists. A cluster role with no feature, and an engine the catalogue does not list, are left alone. Aurora PostgreSQL also lists Bedrock, which the Aurora user guide offers next to Comprehend and SageMaker. Closes #5631 * refactor(rds): keep the two-argument cluster role check Callers that check an AssociatedRoles list without knowing the engine, such as the CloudFormation provisioner in #5656, keep the signature they compile against; it runs the same checks without the feature check. * fix(rds): match feature names without regard to case in every role check The supported-feature check matched without regard to case, but the instance duplicate check and both removal lookups compared exactly, so an instance could take s3Import and then s3import as two roles. All of them now match the same way. The two-argument cluster role check, which nothing here calls, is removed.
This commit is contained in:
1 parent
a5228a0bf7
commit
ff32bae98c
8 files changed
+250
-10
No files matched your search
+5
@@ -790,6 +790,11 @@ class RdsControlPlaneTest {
|
||||
.containsExactly(s3Role, lambdaRole);
|
||||
assertThatThrownBy(() -> rds.addRoleToDBCluster(b -> b.dbClusterIdentifier(clusterName).roleArn(s3Role)))
|
||||
.isInstanceOf(DbClusterRoleAlreadyExistsException.class);
|
||||
// A feature the engine does not list in SupportedFeatureNames is refused.
|
||||
assertThatThrownBy(() -> rds.addRoleToDBCluster(b -> b.dbClusterIdentifier(clusterName)
|
||||
.roleArn("arn:aws:iam::000000000000:role/rds-sqlserver-s3").featureName("S3_INTEGRATION")))
|
||||
.isInstanceOfSatisfying(RdsException.class,
|
||||
e -> assertThat(e.awsErrorDetails().errorCode()).isEqualTo("InvalidParameterValue"));
|
||||
|
||||
rds.removeRoleFromDBCluster(b -> b.dbClusterIdentifier(clusterName).roleArn(s3Role));
|
||||
assertThatThrownBy(() -> rds.removeRoleFromDBCluster(b -> b
|
||||
|
||||
@@ -634,9 +634,12 @@ the feature named; an association that does not exist is `DBClusterRoleNotFound`
|
||||
`DBInstanceRoleNotFound`. A stopped cluster or instance refuses both (`InvalidDBClusterStateFault` /
|
||||
`InvalidDBInstanceState`).
|
||||
|
||||
Associations are recorded, not exercised: Floci does not check the role in IAM, does not check the
|
||||
feature name against the engine, and does not hand the role's credentials to the database, so an
|
||||
`aws_s3` import still needs credentials of its own. Deleting a cluster or instance drops its
|
||||
A `FeatureName` must be one the engine lists in `SupportedFeatureNames` (`DescribeDBEngineVersions`),
|
||||
matched without regard to case; any other is `InvalidParameterValue`, and a `CreateDBCluster` naming
|
||||
one creates nothing. MySQL, MariaDB and Aurora MySQL list none, so their roles take no feature name.
|
||||
|
||||
Associations are recorded, not exercised: Floci does not check the role in IAM and does not hand the
|
||||
role's credentials to the database, so an `aws_s3` import still needs credentials of its own. Deleting a cluster or instance drops its
|
||||
associations, and snapshots, restores and read replicas start without any.
|
||||
|
||||
## Aurora managed password opt-out
|
||||
|
||||
@@ -85,7 +85,7 @@ final class RdsEngineCatalog {
|
||||
private static final Map<String, List<String>> FEATURE_NAMES = Map.of(
|
||||
"postgres", List.of("s3Import", "s3Export", "Lambda"),
|
||||
"sqlserver-se", List.of("S3_INTEGRATION"),
|
||||
"aurora-postgresql", List.of("s3Import", "s3Export", "Lambda", "Comprehend", "SageMaker"));
|
||||
"aurora-postgresql", List.of("s3Import", "s3Export", "Lambda", "Comprehend", "SageMaker", "Bedrock"));
|
||||
|
||||
static List<String> exportableLogTypes(EngineVersion version) {
|
||||
return EXPORTABLE_LOG_TYPES.getOrDefault(version.engine(), List.of());
|
||||
@@ -95,6 +95,26 @@ final class RdsEngineCatalog {
|
||||
return FEATURE_NAMES.getOrDefault(version.engine(), List.of());
|
||||
}
|
||||
|
||||
/**
|
||||
* The role feature names an engine supports, or null when the catalogue does not list the
|
||||
* engine. {@code aurora} is Aurora MySQL's older name, and the SQL Server editions (or the bare
|
||||
* {@code sqlserver} older state records) share one entry.
|
||||
*/
|
||||
static List<String> featureNamesForEngine(String engine) {
|
||||
if (engine == null) {
|
||||
return null;
|
||||
}
|
||||
String catalogued = switch (engine.toLowerCase(Locale.ROOT)) {
|
||||
case "aurora" -> "aurora-mysql";
|
||||
case "sqlserver", "sqlserver-ee", "sqlserver-ex", "sqlserver-web" -> "sqlserver-se";
|
||||
default -> engine.toLowerCase(Locale.ROOT);
|
||||
};
|
||||
if (VERSIONS.stream().noneMatch(v -> v.engine().equals(catalogued))) {
|
||||
return null;
|
||||
}
|
||||
return FEATURE_NAMES.getOrDefault(catalogued, List.of());
|
||||
}
|
||||
|
||||
/** Floci creates read replicas of PostgreSQL instances only. */
|
||||
static boolean supportsReadReplica(EngineVersion version) {
|
||||
return version.engine().equals("postgres");
|
||||
|
||||
@@ -1179,7 +1179,7 @@ public class RdsQueryHandler {
|
||||
|
||||
try {
|
||||
List<DbRoleAssociation> associatedRoles = parseAssociatedRoles(params);
|
||||
service.validateClusterRoleAssociations(id, associatedRoles);
|
||||
service.validateClusterRoleAssociations(id, engine, associatedRoles);
|
||||
Double serverlessV2Min = parseDoubleParam(params, "ServerlessV2ScalingConfiguration.MinCapacity");
|
||||
Double serverlessV2Max = parseDoubleParam(params, "ServerlessV2ScalingConfiguration.MaxCapacity");
|
||||
Integer serverlessV2SecondsUntilAutoPause = parseIntegerParam(
|
||||
|
||||
@@ -9743,6 +9743,7 @@ public class RdsService implements Resettable, ResourceProvider {
|
||||
String effectiveRegion = effectiveRegion(region);
|
||||
DbCluster cluster = getDbCluster(clusterId, effectiveRegion);
|
||||
requireAvailableCluster(cluster, clusterId);
|
||||
requireSupportedFeature(engineName(cluster), featureName);
|
||||
requireRoleNotAssociated(cluster, clusterId, roleArn);
|
||||
cluster.getAssociatedRoles().add(new DbRoleAssociation(roleArn, blankToNull(featureName)));
|
||||
putClusterForScope(currentAccountId(), effectiveRegion, clusterId, cluster);
|
||||
@@ -9761,6 +9762,7 @@ public class RdsService implements Resettable, ResourceProvider {
|
||||
DbCluster cluster = getDbCluster(clusterId, effectiveRegion);
|
||||
requireAvailableCluster(cluster, clusterId);
|
||||
for (DbRoleAssociation role : roles) {
|
||||
requireSupportedFeature(engineName(cluster), role.getFeatureName());
|
||||
requireRoleNotAssociated(cluster, clusterId, role.getRoleArn());
|
||||
}
|
||||
for (DbRoleAssociation role : roles) {
|
||||
@@ -9793,7 +9795,7 @@ public class RdsService implements Resettable, ResourceProvider {
|
||||
requireAvailableCluster(cluster, clusterId);
|
||||
String feature = blankToNull(featureName);
|
||||
boolean removed = cluster.getAssociatedRoles().removeIf(existing -> existing.getRoleArn().equals(roleArn)
|
||||
&& (feature == null || feature.equals(existing.getFeatureName())));
|
||||
&& (feature == null || feature.equalsIgnoreCase(existing.getFeatureName())));
|
||||
if (!removed) {
|
||||
throw new AwsException("DBClusterRoleNotFound", "Role ARN " + roleArn
|
||||
+ (feature == null ? "" : " for feature " + feature)
|
||||
@@ -9816,8 +9818,9 @@ public class RdsService implements Resettable, ResourceProvider {
|
||||
String effectiveRegion = effectiveRegion(region);
|
||||
DbInstance instance = getDbInstance(instanceId, effectiveRegion);
|
||||
requireAvailableInstance(instance, instanceId);
|
||||
requireSupportedFeature(engineName(instance), featureName);
|
||||
for (DbRoleAssociation existing : instance.getAssociatedRoles()) {
|
||||
if (existing.getRoleArn().equals(roleArn) || featureName.equals(existing.getFeatureName())) {
|
||||
if (existing.getRoleArn().equals(roleArn) || featureName.equalsIgnoreCase(existing.getFeatureName())) {
|
||||
throw new AwsException("DBInstanceRoleAlreadyExists", "Role ARN " + existing.getRoleArn()
|
||||
+ " is already associated with DB instance " + instanceId + " for feature "
|
||||
+ existing.getFeatureName() + ".", 400);
|
||||
@@ -9839,7 +9842,7 @@ public class RdsService implements Resettable, ResourceProvider {
|
||||
DbInstance instance = getDbInstance(instanceId, effectiveRegion);
|
||||
requireAvailableInstance(instance, instanceId);
|
||||
boolean removed = instance.getAssociatedRoles().removeIf(existing -> existing.getRoleArn().equals(roleArn)
|
||||
&& featureName.equals(existing.getFeatureName()));
|
||||
&& featureName.equalsIgnoreCase(existing.getFeatureName()));
|
||||
if (!removed) {
|
||||
throw new AwsException("DBInstanceRoleNotFound", "Role ARN " + roleArn
|
||||
+ " is not associated with DB instance " + instanceId + " for feature " + featureName + ".", 404);
|
||||
@@ -9852,12 +9855,17 @@ public class RdsService implements Resettable, ResourceProvider {
|
||||
/**
|
||||
* Checks the roles a {@code CreateDBCluster} request names before the cluster exists, by the
|
||||
* rules {@link #addRoleToDbCluster} applies one at a time, so a list that would be refused part
|
||||
* way through refuses the create instead of leaving a cluster with half its roles.
|
||||
* way through refuses the create instead of leaving a cluster with half its roles. The feature
|
||||
* names are checked against {@code engine} when the request names one; a create that takes its
|
||||
* engine from a global cluster has them checked once the cluster exists.
|
||||
*/
|
||||
public void validateClusterRoleAssociations(String clusterId, List<DbRoleAssociation> roles) {
|
||||
public void validateClusterRoleAssociations(String clusterId, String engine, List<DbRoleAssociation> roles) {
|
||||
Set<String> roleArns = new HashSet<>();
|
||||
for (DbRoleAssociation role : roles) {
|
||||
requireParameter(role.getRoleArn(), "AssociatedRoles.RoleArn");
|
||||
if (!isBlank(engine)) {
|
||||
requireSupportedFeature(engine, role.getFeatureName());
|
||||
}
|
||||
if (!roleArns.add(role.getRoleArn())) {
|
||||
throw new AwsException("DBClusterRoleAlreadyExists", "Role ARN " + role.getRoleArn()
|
||||
+ " is named more than once for DB cluster " + clusterId + ".", 400);
|
||||
@@ -9869,6 +9877,35 @@ public class RdsService implements Resettable, ResourceProvider {
|
||||
return isBlank(value) ? null : value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Refuses a feature name the engine's {@code SupportedFeatureNames} does not list, matched
|
||||
* without regard to case. No feature name (a cluster role may have none) and an engine the
|
||||
* catalogue does not list pass, so Floci never refuses a feature it cannot judge.
|
||||
*/
|
||||
private static void requireSupportedFeature(String engine, String featureName) {
|
||||
if (isBlank(featureName)) {
|
||||
return;
|
||||
}
|
||||
List<String> supported = RdsEngineCatalog.featureNamesForEngine(engine);
|
||||
if (supported == null || supported.stream().anyMatch(name -> name.equalsIgnoreCase(featureName))) {
|
||||
return;
|
||||
}
|
||||
throw new AwsException("InvalidParameterValue", "The feature " + featureName
|
||||
+ " is not supported for engine " + engine.toLowerCase(Locale.ROOT) + ". Supported features: "
|
||||
+ (supported.isEmpty() ? "none" : String.join(", ", supported)) + ".", 400);
|
||||
}
|
||||
|
||||
/** The engine name the request gave, or the engine's own name for state recorded without one. */
|
||||
private static String engineName(DbCluster cluster) {
|
||||
return !isBlank(cluster.getEngineIdentifier()) ? cluster.getEngineIdentifier()
|
||||
: cluster.getEngine() != null ? cluster.getEngine().name() : null;
|
||||
}
|
||||
|
||||
private static String engineName(DbInstance instance) {
|
||||
return !isBlank(instance.getEngineIdentifier()) ? instance.getEngineIdentifier()
|
||||
: instance.getEngine() != null ? instance.getEngine().name() : null;
|
||||
}
|
||||
|
||||
private static void requireParameter(String value, String name) {
|
||||
if (isBlank(value)) {
|
||||
throw new AwsException("MissingParameter", "The request must contain the parameter " + name + ".", 400);
|
||||
|
||||
+5
@@ -102,6 +102,11 @@ class RdsCatalogueReadIntegrationTest {
|
||||
.body(VERSIONS + ".SupportsReadReplica", equalTo("false"))
|
||||
.body(containsString("<SupportedFeatureNames></SupportedFeatureNames>"))
|
||||
.body(VERSIONS + ".SupportsGlobalDatabases", equalTo("true"));
|
||||
query("DescribeDBEngineVersions").formParam("Engine", "aurora-postgresql").formParam("DefaultOnly", "true")
|
||||
.when().post("/").then()
|
||||
.statusCode(200)
|
||||
.body(VERSIONS + ".SupportedFeatureNames.member",
|
||||
contains("s3Import", "s3Export", "Lambda", "Comprehend", "SageMaker", "Bedrock"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+159
@@ -0,0 +1,159 @@
|
||||
package io.github.hectorvent.floci.services.rds;
|
||||
|
||||
import io.github.hectorvent.floci.testing.RdsMockProfile;
|
||||
import io.quarkus.test.junit.QuarkusTest;
|
||||
import io.quarkus.test.junit.TestProfile;
|
||||
import io.restassured.specification.RequestSpecification;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
|
||||
import static io.restassured.RestAssured.given;
|
||||
import static io.restassured.http.ContentType.URLENC;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
/**
|
||||
* A role's {@code FeatureName} has to be one the engine lists in {@code SupportedFeatureNames}, on
|
||||
* {@code AddRoleToDBInstance}, {@code AddRoleToDBCluster} and {@code CreateDBCluster}.
|
||||
*/
|
||||
@QuarkusTest
|
||||
@TestProfile(RdsMockProfile.class)
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
class RdsRoleFeatureNameIntegrationTest {
|
||||
|
||||
private static final String ROLE = "arn:aws:iam::000000000000:role/rds-feature";
|
||||
private static final String OTHER_ROLE = "arn:aws:iam::000000000000:role/rds-feature-other";
|
||||
|
||||
private static final String AUTH =
|
||||
"AWS4-HMAC-SHA256 Credential=test/20261014/us-east-1/rds/aws4_request, "
|
||||
+ "SignedHeaders=content-type;host, Signature=test";
|
||||
|
||||
private static RequestSpecification query(String action) {
|
||||
return given().header("Authorization", AUTH)
|
||||
.contentType(URLENC)
|
||||
.formParam("Action", action)
|
||||
.formParam("Version", "2014-10-31");
|
||||
}
|
||||
|
||||
private static void createInstance(String id, String engine) {
|
||||
query("CreateDBInstance")
|
||||
.formParam("DBInstanceIdentifier", id)
|
||||
.formParam("Engine", engine)
|
||||
.formParam("DBInstanceClass", "db.t3.micro")
|
||||
.formParam("MasterUsername", "admin")
|
||||
.formParam("MasterUserPassword", "password123")
|
||||
.formParam("AllocatedStorage", "20")
|
||||
.when().post("/").then().statusCode(200);
|
||||
}
|
||||
|
||||
private static void createCluster(String id, String engine) {
|
||||
query("CreateDBCluster")
|
||||
.formParam("DBClusterIdentifier", id)
|
||||
.formParam("Engine", engine)
|
||||
.formParam("MasterUsername", "admin")
|
||||
.formParam("MasterUserPassword", "password123")
|
||||
.when().post("/").then().statusCode(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(1)
|
||||
void instanceFeatureMustBeOneTheEngineSupports() {
|
||||
createInstance("feature-mysql", "mysql");
|
||||
query("AddRoleToDBInstance").formParam("DBInstanceIdentifier", "feature-mysql")
|
||||
.formParam("RoleArn", ROLE).formParam("FeatureName", "Lambda")
|
||||
.when().post("/").then().statusCode(400)
|
||||
.body("ErrorResponse.Error.Code", equalTo("InvalidParameterValue"))
|
||||
.body("ErrorResponse.Error.Message", containsString("Supported features: none"));
|
||||
|
||||
createInstance("feature-postgres", "postgres");
|
||||
query("AddRoleToDBInstance").formParam("DBInstanceIdentifier", "feature-postgres")
|
||||
.formParam("RoleArn", ROLE).formParam("FeatureName", "SageMaker")
|
||||
.when().post("/").then().statusCode(400)
|
||||
.body("ErrorResponse.Error.Code", equalTo("InvalidParameterValue"))
|
||||
.body("ErrorResponse.Error.Message", containsString("s3Import, s3Export, Lambda"));
|
||||
// Matched without regard to case, and kept as the request spelled it.
|
||||
query("AddRoleToDBInstance").formParam("DBInstanceIdentifier", "feature-postgres")
|
||||
.formParam("RoleArn", ROLE).formParam("FeatureName", "s3import")
|
||||
.when().post("/").then().statusCode(200);
|
||||
query("DescribeDBInstances").formParam("DBInstanceIdentifier", "feature-postgres")
|
||||
.when().post("/").then().statusCode(200)
|
||||
.body(containsString("<FeatureName>s3import</FeatureName>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(5)
|
||||
void theOtherFeatureChecksMatchWithoutRegardToCaseToo() {
|
||||
// feature-postgres holds ROLE for "s3import" (order 1). The same feature in another case is
|
||||
// the same feature: a second role for it is refused, and it finds the association to remove.
|
||||
query("AddRoleToDBInstance").formParam("DBInstanceIdentifier", "feature-postgres")
|
||||
.formParam("RoleArn", OTHER_ROLE).formParam("FeatureName", "s3Import")
|
||||
.when().post("/").then().statusCode(400)
|
||||
.body("ErrorResponse.Error.Code", equalTo("DBInstanceRoleAlreadyExists"));
|
||||
query("RemoveRoleFromDBInstance").formParam("DBInstanceIdentifier", "feature-postgres")
|
||||
.formParam("RoleArn", ROLE).formParam("FeatureName", "S3IMPORT")
|
||||
.when().post("/").then().statusCode(200);
|
||||
|
||||
// feature-apg holds ROLE for "Bedrock" (order 2); a cluster removal matches it the same way.
|
||||
query("RemoveRoleFromDBCluster").formParam("DBClusterIdentifier", "feature-apg")
|
||||
.formParam("RoleArn", ROLE).formParam("FeatureName", "bedrock")
|
||||
.when().post("/").then().statusCode(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(2)
|
||||
void clusterFeatureMustBeOneTheEngineSupports() {
|
||||
createCluster("feature-apg", "aurora-postgresql");
|
||||
query("AddRoleToDBCluster").formParam("DBClusterIdentifier", "feature-apg")
|
||||
.formParam("RoleArn", ROLE).formParam("FeatureName", "Bedrock")
|
||||
.when().post("/").then().statusCode(200);
|
||||
query("AddRoleToDBCluster").formParam("DBClusterIdentifier", "feature-apg")
|
||||
.formParam("RoleArn", OTHER_ROLE).formParam("FeatureName", "S3_INTEGRATION")
|
||||
.when().post("/").then().statusCode(400)
|
||||
.body("ErrorResponse.Error.Code", equalTo("InvalidParameterValue"));
|
||||
|
||||
// Aurora MySQL lists no features: its roles take none, and a named one is refused.
|
||||
createCluster("feature-ams", "aurora-mysql");
|
||||
query("AddRoleToDBCluster").formParam("DBClusterIdentifier", "feature-ams")
|
||||
.formParam("RoleArn", ROLE).formParam("FeatureName", "s3Import")
|
||||
.when().post("/").then().statusCode(400)
|
||||
.body("ErrorResponse.Error.Code", equalTo("InvalidParameterValue"));
|
||||
query("AddRoleToDBCluster").formParam("DBClusterIdentifier", "feature-ams")
|
||||
.formParam("RoleArn", ROLE)
|
||||
.when().post("/").then().statusCode(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(3)
|
||||
void createDbClusterWithAnUnsupportedFeatureCreatesNothing() {
|
||||
query("CreateDBCluster")
|
||||
.formParam("DBClusterIdentifier", "feature-create")
|
||||
.formParam("Engine", "aurora-mysql")
|
||||
.formParam("MasterUsername", "admin")
|
||||
.formParam("MasterUserPassword", "password123")
|
||||
.formParam("AssociatedRoles.DBClusterAssociatedRole.1.RoleArn", ROLE)
|
||||
.formParam("AssociatedRoles.DBClusterAssociatedRole.1.FeatureName", "Lambda")
|
||||
.when().post("/").then().statusCode(400)
|
||||
.body("ErrorResponse.Error.Code", equalTo("InvalidParameterValue"));
|
||||
query("DescribeDBClusters").formParam("DBClusterIdentifier", "feature-create")
|
||||
.when().post("/").then().statusCode(404);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(4)
|
||||
void createDbClusterWithoutAnEngineChecksTheFeatureOnceTheClusterExists() {
|
||||
// No Engine means PostgreSQL, which lists no Comprehend: the roles are refused after the
|
||||
// cluster is made, and the cluster is deleted again.
|
||||
query("CreateDBCluster")
|
||||
.formParam("DBClusterIdentifier", "feature-no-engine")
|
||||
.formParam("MasterUsername", "admin")
|
||||
.formParam("MasterUserPassword", "password123")
|
||||
.formParam("AssociatedRoles.DBClusterAssociatedRole.1.RoleArn", ROLE)
|
||||
.formParam("AssociatedRoles.DBClusterAssociatedRole.1.FeatureName", "Comprehend")
|
||||
.when().post("/").then().statusCode(400)
|
||||
.body("ErrorResponse.Error.Code", equalTo("InvalidParameterValue"));
|
||||
query("DescribeDBClusters").formParam("DBClusterIdentifier", "feature-no-engine")
|
||||
.when().post("/").then().statusCode(404);
|
||||
}
|
||||
}
|
||||
@@ -2948,6 +2948,17 @@ class RdsServiceTest {
|
||||
RdsEngineCatalog.VERSIONS.forEach(v -> assertEquals(1L, defaults.get(v.engine()), v.engine()));
|
||||
}
|
||||
|
||||
@Test
|
||||
void supportedFeatureNamesResolveEngineAliases() {
|
||||
assertEquals(List.of("S3_INTEGRATION"), RdsEngineCatalog.featureNamesForEngine("sqlserver-ee"));
|
||||
assertEquals(List.of("S3_INTEGRATION"), RdsEngineCatalog.featureNamesForEngine("SQLSERVER"));
|
||||
assertEquals(List.of(), RdsEngineCatalog.featureNamesForEngine("aurora"));
|
||||
assertEquals(List.of("s3Import", "s3Export", "Lambda"), RdsEngineCatalog.featureNamesForEngine("POSTGRES"));
|
||||
// An engine the catalogue does not list is not judged.
|
||||
assertNull(RdsEngineCatalog.featureNamesForEngine("oracle-ee"));
|
||||
assertNull(RdsEngineCatalog.featureNamesForEngine(null));
|
||||
}
|
||||
|
||||
@Test
|
||||
void engineVersionsSortNumericallyForUpgradeTargets() {
|
||||
RdsEngineCatalog.EngineVersion pg163 = RdsEngineCatalog.VERSIONS.stream()
|
||||
|
||||
Reference in new issue
Block a user