added noGreeting option for invoke integration test to run

This commit is contained in:
Eslam A. Hefnawy 2016-06-22 21:42:22 +02:00 committed by Philipp Muens
parent a14fb2cf69
commit fdddd2e83c
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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');
});