Skip to content

Commit

Permalink
Merge pull request #1 from MichaelRBond/lifecycle-update
Browse files Browse the repository at this point in the history
Update to new lifecycle hook, `package` to remove deprecation warning
  • Loading branch information
ArtificerEntertainment authored Aug 3, 2019
2 parents 091375d + 099e063 commit eee52a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion add-log-retention.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AwsAddLogRetention {
this.options = options;
this.provider = this.serverless.getProvider('aws');
this.hooks = {
'before:deploy:createDeploymentArtifacts': this.beforeDeploy.bind(this),
'package:createDeploymentArtifacts': this.beforeDeploy.bind(this),
};
}

Expand Down
4 changes: 2 additions & 2 deletions test/add-log-retention.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ describe('serverless-plugin-log-retention', function() {
const instance = createTestInstance();
expect(instance)
.to.have.property('hooks')
.that.has.all.keys('before:deploy:createDeploymentArtifacts');
.that.has.all.keys('package:createDeploymentArtifacts');

const stub = sinon.stub(instance, 'addLogRetentionForFunctions');
instance.hooks['before:deploy:createDeploymentArtifacts']();
instance.hooks['package:createDeploymentArtifacts']();

sinon.assert.calledOnce(stub);
});
Expand Down

0 comments on commit eee52a5

Please sign in to comment.