mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
logo: update
This commit is contained in:
parent
a14480e47a
commit
ebdc103661
@ -80,7 +80,7 @@ CMD.prototype.run = Promise.method(function() {
|
||||
})
|
||||
.each(function(regionJson) {
|
||||
|
||||
JawsCli.log('Endpoint Deployer: Deploying endpoint(s) to region "' + regionJson + '"...');
|
||||
JawsCli.log('Endpoint Deployer: Deploying endpoint(s) to region "' + regionJson.region + '"...');
|
||||
|
||||
var deployer = new ApiDeployer(
|
||||
_this._stage,
|
||||
@ -95,7 +95,7 @@ CMD.prototype.run = Promise.method(function() {
|
||||
JawsCli.log('Endpoint Deployer: Endpoints for stage "'
|
||||
+ _this._stage
|
||||
+ '" successfully deployed to API Gateway in the region "'
|
||||
+ region
|
||||
+ regionJson.region
|
||||
+ '". Access them @ '
|
||||
+ url);
|
||||
});
|
||||
@ -245,7 +245,7 @@ ApiDeployer.prototype._validateAndSantizeTaggedEndpoints = Promise.method(functi
|
||||
if (e.Path.charAt(0) === '/') e.Path = e.Path.substring(1);
|
||||
|
||||
// Sanitize method
|
||||
e.method = e.method.toUpperCase();
|
||||
e.Method = e.Method.toUpperCase();
|
||||
}
|
||||
});
|
||||
|
||||
@ -439,7 +439,7 @@ ApiDeployer.prototype._createEndpointMethod = Promise.method(function(endpoint)
|
||||
|
||||
// Create Method
|
||||
var methodBody = {
|
||||
authorizationType: endpoint.endpoint.authorizationType,
|
||||
authorizationType: endpoint.apiGateway.cloudFormation.AuthorizationType,
|
||||
};
|
||||
|
||||
// If Request Params, add them
|
||||
@ -516,7 +516,7 @@ ApiDeployer.prototype._createEndpointIntegration = Promise.method(function(endpo
|
||||
+ ':function:'
|
||||
+ [_this._stage,
|
||||
_this._prjJson.name,
|
||||
endpoint.lambda.functionName, // TODO: Need to get this
|
||||
utils.generateLambdaName(endpoint.lambda),
|
||||
].join('_-_').replace(/ /g, '')
|
||||
+ '/invocations',
|
||||
credentials: _this._regionJson.iamRoleArnApiGateway,
|
||||
@ -726,12 +726,15 @@ ApiDeployer.prototype._createEndpointMethodIntegResponses = Promise.method(funct
|
||||
return Promise.try(function() {
|
||||
|
||||
// Collect Response Keys
|
||||
if (endpoint.apiGateway.cloudFormation.Responses) return Object.keys(endpoint.apiGateway.cloudFormation.responses);
|
||||
else return [];
|
||||
if (endpoint.apiGateway.cloudFormation.Responses) {
|
||||
return Object.keys(endpoint.apiGateway.cloudFormation.Responses);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
})
|
||||
.each(function(responseKey) {
|
||||
|
||||
var thisResponse = endpoint.apiGateway.cloudFormation.responses[responseKey];
|
||||
var thisResponse = endpoint.apiGateway.cloudFormation.Responses[responseKey];
|
||||
var integrationResponseBody = {};
|
||||
|
||||
// Add Response Parameters
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
|
||||
var Jaws = require('../../lib/index.js'),
|
||||
CmdDeployEndpoints = require('../../lib/commands/deploy_endpoint'),
|
||||
CmdTag = require('../../lib/commands/tag'),
|
||||
JawsError = require('../../lib/jaws-error'),
|
||||
testUtils = require('../test_utils'),
|
||||
Promise = require('bluebird'),
|
||||
@ -31,10 +32,14 @@ describe('Test deploy endpoint command', function() {
|
||||
JAWS = new Jaws();
|
||||
|
||||
// Get Lambda Paths
|
||||
lambdaPaths.lambda1 = path.join(projPath, 'back', 'lambdas', 'sessions', 'show', 'jaws.json');
|
||||
lambdaPaths.lambda2 = path.join(projPath, 'back', 'lambdas', 'sessions', 'create', 'jaws.json');
|
||||
lambdaPaths.lambda3 = path.join(projPath, 'back', 'lambdas', 'users', 'create', 'jaws.json');
|
||||
}).then(done);
|
||||
lambdaPaths.lambda1 = path.join(projPath, 'back', 'lambdas', 'sessions', 'show', 'awsm.json');
|
||||
lambdaPaths.lambda2 = path.join(projPath, 'back', 'lambdas', 'sessions', 'create', 'awsm.json');
|
||||
lambdaPaths.lambda3 = path.join(projPath, 'back', 'lambdas', 'users', 'create', 'awsm.json');
|
||||
|
||||
})
|
||||
.then(function() {
|
||||
CmdTag.tagAll(JAWS, 'endpoint', false);
|
||||
}).then(done);
|
||||
});
|
||||
|
||||
describe('Positive tests', function() {
|
||||
@ -56,9 +61,9 @@ describe('Test deploy endpoint command', function() {
|
||||
});
|
||||
|
||||
it('Check jaws.json files were untagged', function(done) {
|
||||
assert.equal(false, require(lambdaPaths.lambda1).endpoint.deploy);
|
||||
assert.equal(false, require(lambdaPaths.lambda2).endpoint.deploy);
|
||||
assert.equal(false, require(lambdaPaths.lambda3).endpoint.deploy);
|
||||
assert.equal(false, require(lambdaPaths.lambda1).apiGateway.deploy);
|
||||
assert.equal(false, require(lambdaPaths.lambda2).apiGateway.deploy);
|
||||
assert.equal(false, require(lambdaPaths.lambda3).apiGateway.deploy);
|
||||
done();
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user