mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
feat(AWS Deploy): Update according to shifted CloudFormation limits
(PR #8433)
This commit is contained in:
parent
989bd66469
commit
7e9b2eac74
@ -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.';
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user