Skip to content

Commit

Permalink
Remove unused api gw log level test
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericbarthelet committed Sep 30, 2020
1 parent 0cb980f commit cb6e0ce
Showing 1 changed file with 2 additions and 16 deletions.
Expand Up @@ -8,11 +8,7 @@ const sinon = require('sinon');
const _ = require('lodash');
const Serverless = require('../../../../../../../../Serverless');
const AwsProvider = require('../../../../../../provider/awsProvider');
const {
updateStage,
apiGatewayValidLogLevels,
defaultApiGatewayLogLevel,
} = require('./updateStage');
const { updateStage, defaultApiGatewayLogLevel } = require('./updateStage');

chai.use(require('sinon-chai'));
chai.use(require('chai-as-promised'));
Expand Down Expand Up @@ -677,7 +673,7 @@ describe('#updateStage()', () => {
return checkLogLevel(null, defaultApiGatewayLogLevel);
});

apiGatewayValidLogLevels.forEach(logLevel => {
['INFO', 'ERROR'].forEach(logLevel => {
it(`should update the stage with a custom APIGW log level if given ${logLevel}`, () => {
return checkLogLevel(logLevel, logLevel);
});
Expand All @@ -695,16 +691,6 @@ describe('#updateStage()', () => {
});
});

it('should reject a custom APIGW log level if value is invalid', () => {
context.state.service.provider.logs = {
restApi: {
level: 'INVALID',
},
};

return expect(updateStage.call(context)).to.be.rejectedWith('invalid value');
});

it('should disable existing access log settings when accessLogging is set to false', () => {
context.state.service.provider.logs = {
restApi: {
Expand Down

0 comments on commit cb6e0ce

Please sign in to comment.