mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
fix(AWS APIGW): Ensure to apply API GW stage settings with no endpoints
Fixes #7036
This commit is contained in:
parent
4a947b215c
commit
dfa0967ecf
@ -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;
|
||||
|
||||
@ -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: {
|
||||
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user