Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(rds): migrate tests to use the Assertions module #18606

Merged
merged 2 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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