Skip to content

Commit

Permalink
fix(AWS APIGW): Ensure to apply API GW stage settings with no endpoints
Browse files Browse the repository at this point in the history
Fixes #7036
  • Loading branch information
medikoo committed Dec 23, 2019
1 parent a2db989 commit e93e6f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions lib/plugins/aws/package/compile/events/apiGateway/index.js
Expand Up @@ -75,10 +75,6 @@ class AwsCompileApigEvents {
const getServiceState = require('../../../../lib/getServiceState').getServiceState;

const state = getServiceState.call(this);
if (!this.serverless.utils.isEventUsed(state.service.functions, 'http')) {
return BbPromise.resolve();
}

const updateStage = require('./lib/hack/updateStage').updateStage;

this.state = state;
Expand Down
Expand Up @@ -142,7 +142,7 @@ describe('AwsCompileApigEvents', () => {
});
});

it('should skip the updateStage step when no http events are found', () => {
it('should not skip the updateStage step when no http events are found', () => {
getServiceStateStub.returns({
service: {
functions: {
Expand All @@ -154,7 +154,7 @@ describe('AwsCompileApigEvents', () => {
});

return awsCompileApigEvents.hooks['after:deploy:deploy']().then(() => {
expect(updateStageStub.calledOnce).to.equal(false);
expect(updateStageStub.calledOnce).to.equal(true);
});
});
});
Expand Down

0 comments on commit e93e6f4

Please sign in to comment.