From e8f6026566c01f579c0f1ef57dcdc2fadc769396 Mon Sep 17 00:00:00 2001 From: drexler Date: Thu, 10 Oct 2019 06:34:41 -0400 Subject: [PATCH 1/2] fix: remove unneeded validation check --- lib/plugins/aws/package/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plugins/aws/package/index.js b/lib/plugins/aws/package/index.js index 5ed9b0e5d..db90ed2cc 100644 --- a/lib/plugins/aws/package/index.js +++ b/lib/plugins/aws/package/index.js @@ -51,9 +51,9 @@ class AwsPackage { * Outer lifecycle hooks */ 'package:cleanup': () => - BbPromise.bind(this) - .then(() => this.serverless.pluginManager.spawn('aws:common:validate')) - .then(() => this.serverless.pluginManager.spawn('aws:common:cleanupTempDir')), + BbPromise.bind(this).then(() => + this.serverless.pluginManager.spawn('aws:common:cleanupTempDir') + ), 'package:initialize': () => BbPromise.bind(this).then(this.generateCoreTemplate), From 8f5d59987caae83a354a5bab54fcea4d319ee693 Mon Sep 17 00:00:00 2001 From: drexler Date: Thu, 10 Oct 2019 06:34:53 -0400 Subject: [PATCH 2/2] test: update cover test --- lib/plugins/aws/package/index.test.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/plugins/aws/package/index.test.js b/lib/plugins/aws/package/index.test.js index fdfa003e3..ee810f5e9 100644 --- a/lib/plugins/aws/package/index.test.js +++ b/lib/plugins/aws/package/index.test.js @@ -109,16 +109,12 @@ describe('AwsPackage', () => { }); it('should run "package:cleanup" hook', () => { - const spawnAwsCommonValidateStub = spawnStub.withArgs('aws:common:validate').resolves(); const spawnAwsCommonCleanupTempDirStub = spawnStub .withArgs('aws:common:cleanupTempDir') .resolves(); return awsPackage.hooks['package:cleanup']().then(() => { - expect(spawnAwsCommonValidateStub.calledOnce).to.equal(true); - expect(spawnAwsCommonCleanupTempDirStub.calledAfter(spawnAwsCommonValidateStub)).to.equal( - true - ); + expect(spawnAwsCommonCleanupTempDirStub.calledOnce).to.equal(true); }); });