Skip to content

Commit

Permalink
Merge pull request serverless#6831 from serverless/revert-6780-mfa-pause
Browse files Browse the repository at this point in the history
Revert "Pause for mfa input"
  • Loading branch information
medikoo authored Oct 14, 2019
2 parents a434223 + fe04475 commit 1569e93
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/plugins/aws/package/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ class AwsPackage {
* Outer lifecycle hooks
*/
'package:cleanup': () =>
BbPromise.bind(this).then(() =>
this.serverless.pluginManager.spawn('aws:common:cleanupTempDir')
),
BbPromise.bind(this)
.then(() => this.serverless.pluginManager.spawn('aws:common:validate'))
.then(() => this.serverless.pluginManager.spawn('aws:common:cleanupTempDir')),

'package:initialize': () => BbPromise.bind(this).then(this.generateCoreTemplate),

Expand Down
6 changes: 5 additions & 1 deletion lib/plugins/aws/package/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,16 @@ 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(spawnAwsCommonCleanupTempDirStub.calledOnce).to.equal(true);
expect(spawnAwsCommonValidateStub.calledOnce).to.equal(true);
expect(spawnAwsCommonCleanupTempDirStub.calledAfter(spawnAwsCommonValidateStub)).to.equal(
true
);
});
});

Expand Down

0 comments on commit 1569e93

Please sign in to comment.