diff --git a/lib/actions/EndpointDeployApiGateway.js b/lib/actions/EndpointDeployApiGateway.js index a41b343d2..cbd436ff8 100644 --- a/lib/actions/EndpointDeployApiGateway.js +++ b/lib/actions/EndpointDeployApiGateway.js @@ -262,6 +262,8 @@ module.exports = function(SPlugin, serverlessPath) { * Create Authorizers */ + // TODO: Loop through each function, check if authorizer exists, find or create it + _createAuthorizers() { let _this = this; diff --git a/tests/test-prj/functions/function0/handler.js b/tests/test-prj/functions/function0/handler.js index 919263934..c1ecfd2cc 100644 --- a/tests/test-prj/functions/function0/handler.js +++ b/tests/test-prj/functions/function0/handler.js @@ -1,9 +1,5 @@ 'use strict'; -// Load ENV -var ServerlessHelpers = require('serverless-helpers-js'); -ServerlessHelpers.loadEnv(); - // Lambda Handler module.exports.handler = function(event, context) { return context.done(null, { diff --git a/tests/test-prj/functions/group1/function1/handler.js b/tests/test-prj/functions/group1/function1/handler.js index 919263934..c1ecfd2cc 100644 --- a/tests/test-prj/functions/group1/function1/handler.js +++ b/tests/test-prj/functions/group1/function1/handler.js @@ -1,9 +1,5 @@ 'use strict'; -// Load ENV -var ServerlessHelpers = require('serverless-helpers-js'); -ServerlessHelpers.loadEnv(); - // Lambda Handler module.exports.handler = function(event, context) { return context.done(null, { diff --git a/tests/test-prj/functions/group1/function1/s-function.json b/tests/test-prj/functions/group1/function1/s-function.json index 7d5ca0bb8..0eb01692d 100644 --- a/tests/test-prj/functions/group1/function1/s-function.json +++ b/tests/test-prj/functions/group1/function1/s-function.json @@ -43,14 +43,14 @@ { "path": "group1/function1", "method": "GET", - "authorizationType": "${endpointVariable}", + "authorizationType": "CUSTOM", "authorizerFunction": "function4", "apiKeyRequired": false, "requestParameters": "$${endpointTemplate}", "requestTemplates": "$${apiRequestTemplate}", "responses": { "default": { - "statusCode": "200", + "statusCode": "${statusCode}", "responseParameters": {}, "responseModels": {}, "responseTemplates": { diff --git a/tests/test-prj/functions/group1/function2/handler.js b/tests/test-prj/functions/group1/function2/handler.js index cc11e2abb..10c5ffafa 100644 --- a/tests/test-prj/functions/group1/function2/handler.js +++ b/tests/test-prj/functions/group1/function2/handler.js @@ -1,9 +1,5 @@ 'use strict'; -// Load ENV -var ServerlessHelpers = require('serverless-helpers-js'); -ServerlessHelpers.loadEnv(); - // Lambda Handler module.exports.handler = function(event, context) { return context.done(null, { message: '"functionTwo" lambda function has run successfully' }); diff --git a/tests/test-prj/functions/group1/function3/handler.js b/tests/test-prj/functions/group1/function3/handler.js index e56224823..d0a3cedd5 100644 --- a/tests/test-prj/functions/group1/function3/handler.js +++ b/tests/test-prj/functions/group1/function3/handler.js @@ -1,9 +1,5 @@ 'use strict'; -// Load ENV -var ServerlessHelpers = require('serverless-helpers-js'); -ServerlessHelpers.loadEnv(); - // Lambda Handler module.exports.handler = function(event, context) { return context.done(null, { message: '"functionThree" lambda function has run successfully' }); diff --git a/tests/test-prj/functions/group1/group2/function4/handler.js b/tests/test-prj/functions/group1/group2/function4/handler.js index e56224823..d0a3cedd5 100644 --- a/tests/test-prj/functions/group1/group2/function4/handler.js +++ b/tests/test-prj/functions/group1/group2/function4/handler.js @@ -1,9 +1,5 @@ 'use strict'; -// Load ENV -var ServerlessHelpers = require('serverless-helpers-js'); -ServerlessHelpers.loadEnv(); - // Lambda Handler module.exports.handler = function(event, context) { return context.done(null, { message: '"functionThree" lambda function has run successfully' }); diff --git a/tests/test_utils.js b/tests/test_utils.js index 3da6cd3ba..8247b82c0 100644 --- a/tests/test_utils.js +++ b/tests/test_utils.js @@ -48,7 +48,7 @@ module.exports.createTestProject = function(config, npmInstallDirs) { project: projectName, projectBucket: projectBucket, projectBucketRegion: projectRegion, - endpointVariable: "none" + statusCode: "200" }; let stageVariables = {