feat(AWS Deploy): Update according to shifted CloudFormation limits

(PR #8433)
This commit is contained in:
Frédéric Barthelet 2020-10-28 11:20:39 +01:00 committed by GitHub
parent 989bd66469
commit 7e9b2eac74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -14,10 +14,10 @@ module.exports = {
message += `${chalk.yellow('stack:')} ${info.stack}\n`;
message += `${chalk.yellow('resources:')} ${info.resourceCount}`;
if (info.resourceCount >= 150) {
if (info.resourceCount >= 450) {
message += `\n${chalk.red('WARNING:')}\n`;
message += ` You have ${info.resourceCount} resources in your service.\n`;
message += ' CloudFormation has a hard limit of 200 resources in a service.\n';
message += ' CloudFormation has a hard limit of 500 resources in a service.\n';
message += ' For advice on avoiding this limit, check out this link: http://bit.ly/2IiYB38.';
}

View File

@ -57,7 +57,7 @@ describe('#display()', () => {
expect(message).to.equal(expectedMessage);
});
it('should display a warning if 150+ resources', () => {
it('should display a warning if 450+ resources', () => {
let expectedMessage = '';
expectedMessage += `${chalk.yellow.underline('Service Information')}\n`;
@ -65,14 +65,14 @@ describe('#display()', () => {
expectedMessage += `${chalk.yellow('stage:')} dev\n`;
expectedMessage += `${chalk.yellow('region:')} eu-west-1\n`;
expectedMessage += `${chalk.yellow('stack:')} my-first-dev\n`;
expectedMessage += `${chalk.yellow('resources:')} 150`;
expectedMessage += `${chalk.yellow('resources:')} 450`;
expectedMessage += `\n${chalk.red('WARNING:')}\n`;
expectedMessage += ' You have 150 resources in your service.\n';
expectedMessage += ' CloudFormation has a hard limit of 200 resources in a service.\n';
expectedMessage += ' You have 450 resources in your service.\n';
expectedMessage += ' CloudFormation has a hard limit of 500 resources in a service.\n';
expectedMessage +=
' For advice on avoiding this limit, check out this link: http://bit.ly/2IiYB38.';
awsInfo.gatheredData.info.resourceCount = 150;
awsInfo.gatheredData.info.resourceCount = 450;
const message = awsInfo.displayServiceInfo();
expect(consoleLogStub.calledOnce).to.equal(true);