From fdddd2e83cbcf0c6ce6bb3e35889785ee4f11f2b Mon Sep 17 00:00:00 2001 From: "Eslam A. Hefnawy" Date: Wed, 22 Jun 2016 21:42:22 +0200 Subject: [PATCH] added noGreeting option for invoke integration test to run --- lib/Serverless.js | 3 ++- tests/integration_test.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Serverless.js b/lib/Serverless.js index 8f91174a6..a0cdef245 100644 --- a/lib/Serverless.js +++ b/lib/Serverless.js @@ -41,7 +41,6 @@ class Serverless { init() { // create a new CLI instance this.cli = new CLI(this); - this.cli.asciiGreeting(); // get an array of commands and options that should be processed this.processedInput = this.cli.processInput(); @@ -49,6 +48,8 @@ class Serverless { // set the options this.pluginManager.setOptions(this.processedInput.options); + if (!this.processedInput.options.noGreeting) this.cli.asciiGreeting(); + return this.service.load(this.processedInput.options) .then(() => { // load all plugins diff --git a/tests/integration_test.js b/tests/integration_test.js index 1734b8068..92aa7d73a 100644 --- a/tests/integration_test.js +++ b/tests/integration_test.js @@ -49,7 +49,7 @@ describe('Service Lifecyle Integration Test', () => { it('should invoke function from aws', function () { this.timeout(0); - const invoked = execSync(`${serverlessExec} invoke --function hello`); + const invoked = execSync(`${serverlessExec} invoke --function hello --noGreeting true`); const result = JSON.parse(new Buffer(invoked, 'base64').toString()); expect(result.message).to.be.equal('Go Serverless v1.0! Your function executed successfully!'); }); @@ -71,7 +71,7 @@ describe('Service Lifecyle Integration Test', () => { it('should invoke updated function from aws', function () { this.timeout(0); - const invoked = execSync(`${serverlessExec} invoke --function hello`); + const invoked = execSync(`${serverlessExec} invoke --function hello --noGreeting true`); const result = JSON.parse(new Buffer(invoked, 'base64').toString()); expect(result.message).to.be.equal('Service Update Succeeded'); });