Skip to content

Commit 17029b4

Browse files
authored
fix: custom endpoint tests with multi-az (#409)
1 parent 9cb9cf2 commit 17029b4

4 files changed

Lines changed: 11 additions & 3 deletions

File tree

tests/integration/container/tests/custom_endpoint.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ import { logger } from "../../../../common/logutils";
3535
import { ProxyHelper } from "./utils/proxy_helper";
3636
import { PluginManager } from "../../../../common/lib";
3737
import { TestDriver } from "./utils/test_driver";
38+
import { DatabaseEngineDeployment } from "./utils/database_engine_deployment";
39+
3840

3941
const itIf =
4042
features.includes(TestEnvironmentFeatures.FAILOVER_SUPPORTED) &&
@@ -44,6 +46,9 @@ const itIf =
4446
? it
4547
: it.skip;
4648

49+
// Custom endpoint is not compatible with multi-az clusters.
50+
const describeIf = !features.includes(TestEnvironmentFeatures.RDS_MULTI_AZ_CLUSTER_SUPPORTED) ? describe : describe.skip;
51+
4752
const endpointId1 = `test-endpoint-1-${randomUUID()}`;
4853
const endpointId2 = `test-endpoint-2-${randomUUID()}`;
4954
let endpointId3: string;
@@ -203,7 +208,7 @@ async function deleteEndpoint(rdsClient: RDSClient, endpointId: string): Promise
203208
}
204209
}
205210

206-
describe("custom endpoint", () => {
211+
describeIf("custom endpoint", () => {
207212
beforeAll(async () => {
208213
env = await TestEnvironment.getCurrent();
209214
const clusterId = env.auroraClusterName;

tests/integration/container/tests/utils/test_environment_features.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ export enum TestEnvironmentFeatures {
2424
PERFORMANCE = "PERFORMANCE",
2525
RUN_AUTOSCALING_TESTS_ONLY = "RUN_AUTOSCALING_TESTS_ONLY",
2626
SKIP_MYSQL_DRIVER_TESTS = "SKIP_MYSQL_DRIVER_TESTS",
27-
SKIP_PG_DRIVER_TESTS = "SKIP_PG_DRIVER_TESTS"
27+
SKIP_PG_DRIVER_TESTS = "SKIP_PG_DRIVER_TESTS",
28+
RDS_MULTI_AZ_CLUSTER_SUPPORTED = "RDS_MULTI_AZ_CLUSTER_SUPPORTED"
2829
}

tests/integration/host/src/test/java/integration/host/TestEnvironmentConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public static TestEnvironmentConfig build(TestEnvironmentRequest request) throws
9393
case RDS_MULTI_AZ_CLUSTER:
9494
initDatabaseParams(env);
9595
createDbCluster(env);
96+
request.getFeatures().add(TestEnvironmentFeatures.RDS_MULTI_AZ_CLUSTER_SUPPORTED);
9697

9798
if (request.getFeatures().contains(TestEnvironmentFeatures.IAM)) {
9899
if (request.getDatabaseEngineDeployment() == DatabaseEngineDeployment.RDS_MULTI_AZ_CLUSTER) {

tests/integration/host/src/test/java/integration/host/TestEnvironmentFeatures.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ public enum TestEnvironmentFeatures {
2828
SKIP_MYSQL_DRIVER_TESTS,
2929
SKIP_PG_DRIVER_TESTS,
3030
TELEMETRY_TRACES_ENABLED,
31-
TELEMETRY_METRICS_ENABLED
31+
TELEMETRY_METRICS_ENABLED,
32+
RDS_MULTI_AZ_CLUSTER_SUPPORTED
3233
}

0 commit comments

Comments
 (0)