Merge pull request #6780 from drexler/mfa-pause

Pause for mfa input
This commit is contained in:
Philipp Muens 2019-10-11 09:05:33 +02:00 committed by GitHub
commit aba4e09c7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View File

@ -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),

View File

@ -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);
});
});