diff --git a/package/lib/compileFunctions.js b/package/lib/compileFunctions.js index 22404a6..615fb7b 100644 --- a/package/lib/compileFunctions.js +++ b/package/lib/compileFunctions.js @@ -35,10 +35,6 @@ module.exports = { _.get(funcObject, 'memorySize') || _.get(this, 'serverless.service.provider.memorySize') || 256; - funcTemplate.properties.location = - _.get(funcObject, 'location') || - _.get(this, 'serverless.service.provider.region') || - 'us-central1'; funcTemplate.properties.runtime = _.get(funcObject, 'runtime') || _.get(this, 'serverless.service.provider.runtime') || diff --git a/package/lib/compileFunctions.test.js b/package/lib/compileFunctions.test.js index 3a7ceea..cfdc6f4 100644 --- a/package/lib/compileFunctions.test.js +++ b/package/lib/compileFunctions.test.js @@ -114,7 +114,6 @@ describe('CompileFunctions', () => { entryPoint: 'func1', availableMemoryMb: 1024, timeout: '60s', - location: 'us-central1', sourceArchiveUrl: 'gs://sls-my-service-dev-12345678/some-path/artifact.zip', httpsTrigger: { url: 'foo', @@ -152,7 +151,6 @@ describe('CompileFunctions', () => { entryPoint: 'func1', availableMemoryMb: 1024, timeout: '60s', - location: 'us-central1', sourceArchiveUrl: 'gs://sls-my-service-dev-12345678/some-path/artifact.zip', httpsTrigger: { url: 'foo', @@ -190,7 +188,6 @@ describe('CompileFunctions', () => { entryPoint: 'func1', availableMemoryMb: 256, timeout: '120s', - location: 'us-central1', sourceArchiveUrl: 'gs://sls-my-service-dev-12345678/some-path/artifact.zip', httpsTrigger: { url: 'foo', @@ -228,7 +225,6 @@ describe('CompileFunctions', () => { entryPoint: 'func1', availableMemoryMb: 256, timeout: '120s', - location: 'us-central1', sourceArchiveUrl: 'gs://sls-my-service-dev-12345678/some-path/artifact.zip', httpsTrigger: { url: 'foo', @@ -268,7 +264,6 @@ describe('CompileFunctions', () => { entryPoint: 'func1', availableMemoryMb: 256, timeout: '60s', - location: 'us-central1', sourceArchiveUrl: 'gs://sls-my-service-dev-12345678/some-path/artifact.zip', httpsTrigger: { url: 'foo', @@ -310,7 +305,6 @@ describe('CompileFunctions', () => { entryPoint: 'func1', availableMemoryMb: 256, timeout: '60s', - location: 'us-central1', sourceArchiveUrl: 'gs://sls-my-service-dev-12345678/some-path/artifact.zip', httpsTrigger: { url: 'foo', @@ -356,7 +350,6 @@ describe('CompileFunctions', () => { entryPoint: 'func1', availableMemoryMb: 256, timeout: '60s', - location: 'us-central1', sourceArchiveUrl: 'gs://sls-my-service-dev-12345678/some-path/artifact.zip', httpsTrigger: { url: 'foo', @@ -402,7 +395,6 @@ describe('CompileFunctions', () => { TEST_VAR: 'test', }, timeout: '60s', - location: 'us-central1', sourceArchiveUrl: 'gs://sls-my-service-dev-12345678/some-path/artifact.zip', httpsTrigger: { url: 'foo', @@ -445,7 +437,6 @@ describe('CompileFunctions', () => { TEST_VAR: 'test', }, timeout: '60s', - location: 'us-central1', sourceArchiveUrl: 'gs://sls-my-service-dev-12345678/some-path/artifact.zip', httpsTrigger: { url: 'foo', @@ -485,7 +476,6 @@ describe('CompileFunctions', () => { name: 'my-service-dev-func1', properties: { parent: 'projects/myProject/locations/us-central1', - location: 'us-central1', runtime: 'nodejs8', function: 'my-service-dev-func1', entryPoint: 'func1', @@ -536,7 +526,6 @@ describe('CompileFunctions', () => { entryPoint: 'func1', availableMemoryMb: 256, timeout: '60s', - location: 'us-central1', sourceArchiveUrl: 'gs://sls-my-service-dev-12345678/some-path/artifact.zip', httpsTrigger: { url: 'foo', @@ -592,7 +581,6 @@ describe('CompileFunctions', () => { entryPoint: 'func1', availableMemoryMb: 256, timeout: '60s', - location: 'us-central1', sourceArchiveUrl: 'gs://sls-my-service-dev-12345678/some-path/artifact.zip', eventTrigger: { eventType: 'foo', @@ -612,7 +600,6 @@ describe('CompileFunctions', () => { entryPoint: 'func2', availableMemoryMb: 256, timeout: '60s', - location: 'us-central1', sourceArchiveUrl: 'gs://sls-my-service-dev-12345678/some-path/artifact.zip', eventTrigger: { eventType: 'foo', @@ -648,7 +635,6 @@ describe('CompileFunctions', () => { name: 'my-service-dev-func1', properties: { parent: 'projects/myProject/locations/us-central1', - location: 'us-central1', runtime: 'nodejs8', function: 'my-service-dev-func1', entryPoint: 'func1', @@ -690,7 +676,6 @@ describe('CompileFunctions', () => { name: 'my-service-dev-func1', properties: { parent: 'projects/myProject/locations/us-central1', - location: 'us-central1', runtime: 'nodejs8', function: 'my-service-dev-func1', entryPoint: 'func1', @@ -740,7 +725,6 @@ describe('CompileFunctions', () => { name: 'my-service-dev-func1', properties: { parent: 'projects/myProject/locations/us-central1', - location: 'us-central1', runtime: 'nodejs8', function: 'my-service-dev-func1', entryPoint: 'func1', @@ -759,7 +743,6 @@ describe('CompileFunctions', () => { name: 'my-service-dev-func2', properties: { parent: 'projects/myProject/locations/us-central1', - location: 'us-central1', runtime: 'nodejs8', function: 'my-service-dev-func2', entryPoint: 'func2',