Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aws/aws-cdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 57be736407ef3ef8225fcd26495bc95a7568f7cc
Choose a base ref
..
head repository: aws/aws-cdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8f7ca98ef3c8a00c3d2848b272299c2ac27ca628
Choose a head ref
Showing with 27 additions and 0 deletions.
  1. +27 −0 packages/@aws-cdk/aws-rds/test/test.cluster.ts
27 changes: 27 additions & 0 deletions packages/@aws-cdk/aws-rds/test/test.cluster.ts
Original file line number Diff line number Diff line change
@@ -318,6 +318,33 @@ export = {
EngineVersion: "10.7",
}));

test.done();
},

'cluster exposes different read and write endpoints'(test: Test) {
// GIVEN
const stack = testStack();
const vpc = new ec2.Vpc(stack, 'VPC');

// WHEN
const cluster = new DatabaseCluster(stack, 'Database', {
engine: DatabaseClusterEngine.Aurora,
masterUser: {
username: 'admin',
password: SecretValue.plainText('tooshort'),
},
instanceProps: {
instanceType: new ec2.InstanceTypePair(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL),
vpc
}
});

// THEN
test.notDeepEqual(
stack.resolve(cluster.clusterEndpoint),
stack.resolve(cluster.clusterReadEndpoint)
);

test.done();
}
};