@@ -456,14 +456,15 @@ func TestBundle(t *testing.T) {
456456 assert .Equal (t , "js" , jsFunction .Runtime )
457457 assert .Equal (t , "py" , pyFunction .Runtime )
458458 assert .Equal (t , "rs" , rsFunction .Runtime )
459- assert .Equal (t , "provided.al2 " , goFunction .Runtime )
459+ assert .Equal (t , "go " , goFunction .Runtime )
460460}
461461
462462func TestBundleWithManifest (t * testing.T ) {
463463 cwd , _ := os .Getwd ()
464464 basePath := path .Join (filepath .Dir (cwd ), "internal" , "data" )
465465 jsFunctionPath := strings .Replace (filepath .Join (basePath , "hello-js-function-test.zip" ), "\\ " , "/" , - 1 )
466466 pyFunctionPath := strings .Replace (filepath .Join (basePath , "hello-py-function-test.zip" ), "\\ " , "/" , - 1 )
467+ goFunctionPath := strings .Replace (filepath .Join (basePath , "hello-go-binary-function" ), "\\ " , "/" , - 1 )
467468 manifestPath := path .Join (basePath , "manifest.json" )
468469 manifestFile := fmt .Sprintf (`{
469470 "functions": [
@@ -493,10 +494,16 @@ func TestBundleWithManifest(t *testing.T) {
493494 "mainFile": "/some/path/hello-py-function-test",
494495 "name": "hello-py-function-test",
495496 "invocationMode": "stream"
497+ },
498+ {
499+ "path": "%s",
500+ "runtime": "go",
501+ "runtimeVersion": "provided.al2",
502+ "name": "hello-go-binary-function"
496503 }
497504 ],
498505 "version": 1
499- }` , jsFunctionPath , pyFunctionPath )
506+ }` , jsFunctionPath , pyFunctionPath , goFunctionPath )
500507
501508 err := ioutil .WriteFile (manifestPath , []byte (manifestFile ), 0644 )
502509 defer os .Remove (manifestPath )
@@ -509,11 +516,13 @@ func TestBundleWithManifest(t *testing.T) {
509516 assert .Equal (t , "hello-js-function-test" , schedules [0 ].Name )
510517 assert .Equal (t , "* * * * *" , schedules [0 ].Cron )
511518
512- assert .Equal (t , 2 , len (functions .Files ))
519+ assert .Equal (t , 3 , len (functions .Files ))
513520 assert .Equal (t , "a-runtime" , functions .Files ["hello-js-function-test" ].Runtime )
514521 assert .Empty (t , functions .Files ["hello-js-function-test" ].FunctionMetadata .InvocationMode )
515522 assert .Equal (t , "some-other-runtime" , functions .Files ["hello-py-function-test" ].Runtime )
516523 assert .Equal (t , "stream" , functions .Files ["hello-py-function-test" ].FunctionMetadata .InvocationMode )
524+ assert .Equal (t , "provided.al2" , functions .Files ["hello-go-binary-function" ].Runtime )
525+ assert .Empty (t , functions .Files ["hello-go-binary-function" ].FunctionMetadata .InvocationMode )
517526
518527 helloJSConfig := functionsConfig ["hello-js-function-test" ]
519528
0 commit comments