@@ -104,6 +104,7 @@ describe('Examples', () => {
104104 'post-nodejs' : { cwd : null , path : 'post-nodejs' } ,
105105 'post-python' : { cwd : null , path : 'post-python' } ,
106106 'post-php' : { cwd : null , path : 'post-php' } ,
107+ 'post-go' : { cwd : null , path : 'post-go' } ,
107108 'post-ruby' : { cwd : null , path : 'post-ruby' } ,
108109 'scheduled-node' : { cwd : null , path : 'scheduled-node' } ,
109110 'todo-app' : { cwd : null , path : 'todo-app/backend' } ,
@@ -386,6 +387,39 @@ describe('Examples', () => {
386387 } ) ;
387388 } ) ;
388389 } ) ;
390+ describe ( 'post-go' , function ( ) {
391+ const exampleName = 'post-go' ;
392+ before ( function ( done ) {
393+ examples [ exampleName ] . cwd = path . join ( cwd , examples [ exampleName ] . path ) ;
394+ this . timeout ( 300000 ) ;
395+ prepareExample ( cwd , exampleName , ( e ) => {
396+ if ( e ) {
397+ throw e ;
398+ }
399+ deployExample ( examples [ exampleName ] . cwd , ( ee ) => {
400+ if ( ee ) {
401+ throw ee ;
402+ }
403+ done ( ) ;
404+ } ) ;
405+ } ) ;
406+ } ) ;
407+ after ( function ( done ) {
408+ this . timeout ( 100000 ) ;
409+ removeExample ( examples [ exampleName ] . cwd , ( ) => {
410+ done ( ) ;
411+ } ) ;
412+ } ) ;
413+ this . timeout ( 10000 ) ;
414+ it ( 'should return a "hello"' , ( done ) => {
415+ exec ( 'serverless invoke -f go-echo -l --data \'hello!\'' ,
416+ { cwd : examples [ 'post-go' ] . cwd } , ( err , stdout ) => {
417+ if ( err ) throw err ;
418+ expect ( stdout ) . to . contain ( 'hello!' ) ;
419+ done ( ) ;
420+ } ) ;
421+ } ) ;
422+ } ) ;
389423 describe ( 'scheduled-node' , function ( ) {
390424 const exampleName = 'scheduled-node' ;
391425 before ( function ( done ) {
0 commit comments