Skip to content

Commit

Permalink
chore(aws-rds): fix broken integration tests (#19763)
Browse files Browse the repository at this point in the history
----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
corymhall committed Apr 5, 2022
1 parent 4f12209 commit 5ce0ad3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
14 changes: 7 additions & 7 deletions packages/@aws-cdk/aws-rds/test/integ.instance.lit.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"VPCPublicSubnet1SubnetB4246D30": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.0.0/18",
"VpcId": {
"Ref": "VPCB9E5F0B4"
},
"AvailabilityZone": "test-region-1a",
"CidrBlock": "10.0.0.0/18",
"MapPublicIpOnLaunch": true,
"Tags": [
{
Expand Down Expand Up @@ -116,11 +116,11 @@
"VPCPublicSubnet2Subnet74179F39": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.64.0/18",
"VpcId": {
"Ref": "VPCB9E5F0B4"
},
"AvailabilityZone": "test-region-1b",
"CidrBlock": "10.0.64.0/18",
"MapPublicIpOnLaunch": true,
"Tags": [
{
Expand Down Expand Up @@ -213,11 +213,11 @@
"VPCPrivateSubnet1Subnet8BCA10E0": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.128.0/18",
"VpcId": {
"Ref": "VPCB9E5F0B4"
},
"AvailabilityZone": "test-region-1a",
"CidrBlock": "10.0.128.0/18",
"MapPublicIpOnLaunch": false,
"Tags": [
{
Expand Down Expand Up @@ -275,11 +275,11 @@
"VPCPrivateSubnet2SubnetCFCDAA7A": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.192.0/18",
"VpcId": {
"Ref": "VPCB9E5F0B4"
},
"AvailabilityZone": "test-region-1b",
"CidrBlock": "10.0.192.0/18",
"MapPublicIpOnLaunch": false,
"Tags": [
{
Expand Down Expand Up @@ -628,7 +628,7 @@
"Properties": {
"DBInstanceClass": "db.t3.medium",
"AllocatedStorage": "100",
"AutoMinorVersionUpgrade": false,
"AutoMinorVersionUpgrade": true,
"BackupRetentionPeriod": 7,
"CopyTagsToSnapshot": true,
"DBName": "ORCL",
Expand Down Expand Up @@ -696,8 +696,8 @@
}
]
},
"UpdateReplacePolicy": "Snapshot",
"DeletionPolicy": "Snapshot"
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"InstanceLogRetentiontrace487771C8": {
"Type": "Custom::LogRetention",
Expand Down
4 changes: 3 additions & 1 deletion packages/@aws-cdk/aws-rds/test/integ.instance.lit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as targets from '@aws-cdk/aws-events-targets';
import * as lambda from '@aws-cdk/aws-lambda';
import * as logs from '@aws-cdk/aws-logs';
import * as cdk from '@aws-cdk/core';
import { RemovalPolicy } from '@aws-cdk/core';
import * as rds from '../lib';

const app = new cdk.App();
Expand Down Expand Up @@ -63,9 +64,10 @@ class DatabaseInstanceStack extends cdk.Stack {
'listener',
],
cloudwatchLogsRetention: logs.RetentionDays.ONE_MONTH,
autoMinorVersionUpgrade: false,
autoMinorVersionUpgrade: true, // required to be true if LOCATOR is used in the option group
optionGroup,
parameterGroup,
removalPolicy: RemovalPolicy.DESTROY,
});

// Allow connections on default port from any IPV4
Expand Down
14 changes: 7 additions & 7 deletions packages/@aws-cdk/aws-rds/test/integ.proxy.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"vpcPublicSubnet1Subnet2E65531E": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.0.0/18",
"VpcId": {
"Ref": "vpcA2121C38"
},
"AvailabilityZone": "test-region-1a",
"CidrBlock": "10.0.0.0/18",
"MapPublicIpOnLaunch": true,
"Tags": [
{
Expand Down Expand Up @@ -115,11 +115,11 @@
"vpcPublicSubnet2Subnet009B674F": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.64.0/18",
"VpcId": {
"Ref": "vpcA2121C38"
},
"AvailabilityZone": "test-region-1b",
"CidrBlock": "10.0.64.0/18",
"MapPublicIpOnLaunch": true,
"Tags": [
{
Expand Down Expand Up @@ -212,11 +212,11 @@
"vpcPrivateSubnet1Subnet934893E8": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.128.0/18",
"VpcId": {
"Ref": "vpcA2121C38"
},
"AvailabilityZone": "test-region-1a",
"CidrBlock": "10.0.128.0/18",
"MapPublicIpOnLaunch": false,
"Tags": [
{
Expand Down Expand Up @@ -274,11 +274,11 @@
"vpcPrivateSubnet2Subnet7031C2BA": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.192.0/18",
"VpcId": {
"Ref": "vpcA2121C38"
},
"AvailabilityZone": "test-region-1b",
"CidrBlock": "10.0.192.0/18",
"MapPublicIpOnLaunch": false,
"Tags": [
{
Expand Down Expand Up @@ -462,7 +462,7 @@
"Ref": "dbInstanceSubnetGroupD062EC9E"
},
"Engine": "postgres",
"EngineVersion": "11.5",
"EngineVersion": "11.15",
"MasterUsername": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -497,8 +497,8 @@
}
]
},
"UpdateReplacePolicy": "Snapshot",
"DeletionPolicy": "Snapshot"
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"dbProxyIAMRole662F3AB8": {
"Type": "AWS::IAM::Role",
Expand Down
4 changes: 3 additions & 1 deletion packages/@aws-cdk/aws-rds/test/integ.proxy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as ec2 from '@aws-cdk/aws-ec2';
import * as cdk from '@aws-cdk/core';
import { RemovalPolicy } from '@aws-cdk/core';
import * as rds from '../lib';

const app = new cdk.App();
Expand All @@ -9,13 +10,14 @@ const vpc = new ec2.Vpc(stack, 'vpc', { maxAzs: 2 });

const dbInstance = new rds.DatabaseInstance(stack, 'dbInstance', {
engine: rds.DatabaseInstanceEngine.postgres({
version: rds.PostgresEngineVersion.VER_11_5,
version: rds.PostgresEngineVersion.VER_11_15,
}),
instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE3, ec2.InstanceSize.MEDIUM),
credentials: rds.Credentials.fromUsername('master', {
excludeCharacters: '"@/\\',
}),
vpc,
removalPolicy: RemovalPolicy.DESTROY,
});

new rds.DatabaseProxy(stack, 'dbProxy', {
Expand Down

0 comments on commit 5ce0ad3

Please sign in to comment.