Skip to content

Commit

Permalink
fix(rds): add test for InstanceParameterGroup#validate
Browse files Browse the repository at this point in the history
  • Loading branch information
aereal committed Mar 24, 2019
1 parent db1c8f3 commit 9c77fbf
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/@aws-cdk/aws-rds/test/test.cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,21 @@ export = {
}));

test.done();
}
},

'empty instance parameter group is not valid'(test: Test) {
const stack = testStack();
new InstanceParameterGroup(stack, 'Params', {
family: 'hello',
description: 'desc',
parameters: {},
});

const errorMessages = stack.node.validateTree().map(e => e.message);
test.deepEqual(errorMessages, ['At least one parameter required, call setParameter().']);

test.done();
},
};

function testStack() {
Expand Down

0 comments on commit 9c77fbf

Please sign in to comment.