diff --git a/add-log-retention.js b/add-log-retention.js index d65fdd8..7e90c2b 100644 --- a/add-log-retention.js +++ b/add-log-retention.js @@ -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), }; } diff --git a/test/add-log-retention.js b/test/add-log-retention.js index 4c4dc09..ce98012 100644 --- a/test/add-log-retention.js +++ b/test/add-log-retention.js @@ -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); });