serverless-localstack
Advanced tools
Comparing version 0.3.0 to 0.3.1
{ | ||
"name": "serverless-localstack", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Connect Serverless to Localstack!", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -180,4 +180,13 @@ 'use strict'; | ||
it('should not send validateTemplate calls to localstack', () => { | ||
let pathToTemplate = 'https://s3.amazonaws.com/path/to/template'; | ||
let request = sinon.stub(awsProvider, 'request'); | ||
instance = new LocalstackPlugin(serverless, {}) | ||
awsProvider.request('S3','validateTemplate',{}); | ||
expect(request.called).to.be.false; | ||
}); | ||
}); | ||
}) |
@@ -60,3 +60,3 @@ 'use strict'; | ||
} | ||
getStageVariable(){ | ||
@@ -136,4 +136,10 @@ this.debug("config.options_stage: " + this.config.options_stage); | ||
interceptRequest(service, method, params) { | ||
// // Template validation is not supported in LocalStack | ||
if (method == "validateTemplate") { | ||
this.log('Skipping template validation: Unsupported in Localstack'); | ||
return Promise.resolve(""); | ||
} | ||
if (AWS.config[service.toLowerCase()]) { | ||
this.debug(`Using custom endpoint for ${service}: ${AWS.config[service].endpoint}`); | ||
this.debug(`Using custom endpoint for ${service}: ${AWS.config[service.toLowerCase()].endpoint}`); | ||
@@ -147,2 +153,3 @@ if (AWS.config['s3'] && params.TemplateURL) { | ||
return this.awsProviderRequest(service, method, params); | ||
} | ||
@@ -149,0 +156,0 @@ } |
260515
4985