Skip to content

Commit

Permalink
chore(rds): migrate tests to use the Assertions module
Browse files Browse the repository at this point in the history
  • Loading branch information
skinny85 committed Jan 22, 2022
1 parent 0e08eeb commit a45394f
Show file tree
Hide file tree
Showing 14 changed files with 264 additions and 598 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-rds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/assert-internal": "0.0.0",
"@aws-cdk/assertions": "0.0.0",
"@aws-cdk/aws-events-targets": "0.0.0",
"@aws-cdk/aws-lambda": "0.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
Expand Down
18 changes: 1 addition & 17 deletions packages/@aws-cdk/aws-rds/test/cluster-engine.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@aws-cdk/assert-internal/jest';
import { AuroraEngineVersion, AuroraMysqlEngineVersion, AuroraPostgresEngineVersion, DatabaseClusterEngine } from '../lib';

describe('cluster engine', () => {
Expand All @@ -11,8 +10,6 @@ describe('cluster engine', () => {

// THEN
expect(family).toEqual('aurora5.6');


});

test("default parameterGroupFamily for versionless Aurora MySQL cluster engine is 'aurora-mysql5.7'", () => {
Expand All @@ -24,8 +21,6 @@ describe('cluster engine', () => {

// THEN
expect(family).toEqual('aurora-mysql5.7');


});

test('default parameterGroupFamily for versionless Aurora PostgreSQL is not defined', () => {
Expand All @@ -37,8 +32,6 @@ describe('cluster engine', () => {

// THEN
expect(family).toEqual(undefined);


});

test('cluster parameter group correctly determined for AURORA and given version', () => {
Expand All @@ -52,8 +45,6 @@ describe('cluster engine', () => {

// THEN
expect(family).toEqual('aurora5.6');


});

test('cluster parameter group correctly determined for AURORA_MYSQL and given version', () => {
Expand All @@ -67,8 +58,6 @@ describe('cluster engine', () => {

// THEN
expect(family).toEqual('aurora-mysql5.7');


});

test('cluster parameter group correctly determined for AURORA_MYSQL and given version 3', () => {
Expand All @@ -95,8 +84,6 @@ describe('cluster engine', () => {

// THEN
expect(family).toEqual('aurora-postgresql11');


});

test('parameter group family', () => {
Expand All @@ -117,15 +104,12 @@ describe('cluster engine', () => {
'aurora-postgresql9.6');
expect(DatabaseClusterEngine.auroraPostgres({ version: AuroraPostgresEngineVersion.of('10.0', '10') }).parameterGroupFamily).toEqual(
'aurora-postgresql10');


});

test('supported log types', () => {
const mysqlLogTypes = ['error', 'general', 'slowquery', 'audit'];
expect(DatabaseClusterEngine.aurora({ version: AuroraEngineVersion.VER_1_22_2 }).supportedLogTypes).toEqual(mysqlLogTypes);
expect(DatabaseClusterEngine.auroraMysql({ version: AuroraMysqlEngineVersion.VER_2_08_1 }).supportedLogTypes).toEqual(mysqlLogTypes);
expect(DatabaseClusterEngine.auroraPostgres({ version: AuroraPostgresEngineVersion.VER_9_6_9 }).supportedLogTypes).toEqual(['postgresql']);

});
});
});
Loading

0 comments on commit a45394f

Please sign in to comment.