diff --git a/lib/plugins/awsCompileApigEvents/lib/validateInput.js b/lib/plugins/awsCompileApigEvents/lib/validateInput.js deleted file mode 100644 index 4b8776ad0..000000000 --- a/lib/plugins/awsCompileApigEvents/lib/validateInput.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const BbPromise = require('bluebird'); - -module.exports = { - validateInput() { - if (!this.serverless.service.resources.aws.Resources) { - throw new this.serverless.Error( - 'This plugin needs access to Resources section of the AWS CloudFormation template'); - } - - return BbPromise.resolve(); - }, -}; - - diff --git a/lib/plugins/awsCompileApigEvents/tests/all.js b/lib/plugins/awsCompileApigEvents/tests/all.js index e369a3ef9..a9db12903 100644 --- a/lib/plugins/awsCompileApigEvents/tests/all.js +++ b/lib/plugins/awsCompileApigEvents/tests/all.js @@ -1,7 +1,6 @@ 'use strict'; require('./awsCompileApigEvents'); -require('./validateInput'); require('./compilePermissions'); require('./compileRestApi'); require('./compileDeployment'); diff --git a/lib/plugins/awsCompileApigEvents/tests/validateInput.js b/lib/plugins/awsCompileApigEvents/tests/validateInput.js deleted file mode 100644 index c80d62f74..000000000 --- a/lib/plugins/awsCompileApigEvents/tests/validateInput.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -const expect = require('chai').expect; -const AwsCompileApigEvents = require('../awsCompileApigEvents'); -const Serverless = require('../../../Serverless'); - -describe('#validate()', () => { - let serverless; - let awsCompileApigEvents; - - beforeEach(() => { - serverless = new Serverless(); - serverless.init(); - serverless.service.resources = { aws: {} }; - awsCompileApigEvents = new AwsCompileApigEvents(serverless); - }); - - it('should throw an error if the AWS Resources section is not ' + - 'available in the service object', () => { - expect(() => awsCompileApigEvents.validateInput()).to.throw(Error); - }); -}); -