@@ -612,24 +612,27 @@ func TestBundle(t *testing.T) {
612612 functions , schedules , functionsConfig , err := bundle (gocontext .Background (), "../internal/data" , mockObserver {})
613613
614614 assert .Nil (t , err )
615- assert .Equal (t , 3 , len (functions .Files ))
615+ assert .Equal (t , 4 , len (functions .Files ))
616616 assert .Empty (t , schedules )
617617 assert .Nil (t , functionsConfig )
618618
619619 jsFunction := functions .Files ["hello-js-function-test" ]
620620 pyFunction := functions .Files ["hello-py-function-test" ]
621621 rsFunction := functions .Files ["hello-rs-function-test" ]
622+ goFunction := functions .Files ["hello-go-binary-function" ]
622623
623624 assert .Equal (t , "js" , jsFunction .Runtime )
624625 assert .Equal (t , "py" , pyFunction .Runtime )
625626 assert .Equal (t , "rs" , rsFunction .Runtime )
627+ assert .Equal (t , "go" , goFunction .Runtime )
626628}
627629
628630func TestBundleWithManifest (t * testing.T ) {
629631 cwd , _ := os .Getwd ()
630632 basePath := path .Join (filepath .Dir (cwd ), "internal" , "data" )
631633 jsFunctionPath := strings .Replace (filepath .Join (basePath , "hello-js-function-test.zip" ), "\\ " , "/" , - 1 )
632634 pyFunctionPath := strings .Replace (filepath .Join (basePath , "hello-py-function-test.zip" ), "\\ " , "/" , - 1 )
635+ goFunctionPath := strings .Replace (filepath .Join (basePath , "hello-go-binary-function" ), "\\ " , "/" , - 1 )
633636 manifestPath := path .Join (basePath , "manifest.json" )
634637 manifestFile := fmt .Sprintf (`{
635638 "functions": [
@@ -660,10 +663,16 @@ func TestBundleWithManifest(t *testing.T) {
660663 "mainFile": "/some/path/hello-py-function-test",
661664 "name": "hello-py-function-test",
662665 "invocationMode": "stream"
666+ },
667+ {
668+ "path": "%s",
669+ "runtime": "go",
670+ "runtimeVersion": "provided.al2",
671+ "name": "hello-go-binary-function"
663672 }
664673 ],
665674 "version": 1
666- }` , jsFunctionPath , pyFunctionPath )
675+ }` , jsFunctionPath , pyFunctionPath , goFunctionPath )
667676
668677 err := ioutil .WriteFile (manifestPath , []byte (manifestFile ), 0644 )
669678 defer os .Remove (manifestPath )
@@ -676,11 +685,13 @@ func TestBundleWithManifest(t *testing.T) {
676685 assert .Equal (t , "hello-js-function-test" , schedules [0 ].Name )
677686 assert .Equal (t , "* * * * *" , schedules [0 ].Cron )
678687
679- assert .Equal (t , 2 , len (functions .Files ))
688+ assert .Equal (t , 3 , len (functions .Files ))
680689 assert .Equal (t , "a-runtime" , functions .Files ["hello-js-function-test" ].Runtime )
681690 assert .Empty (t , functions .Files ["hello-js-function-test" ].FunctionMetadata .InvocationMode )
682691 assert .Equal (t , "some-other-runtime" , functions .Files ["hello-py-function-test" ].Runtime )
683692 assert .Equal (t , "stream" , functions .Files ["hello-py-function-test" ].FunctionMetadata .InvocationMode )
693+ assert .Equal (t , "provided.al2" , functions .Files ["hello-go-binary-function" ].Runtime )
694+ assert .Empty (t , functions .Files ["hello-go-binary-function" ].FunctionMetadata .InvocationMode )
684695
685696 helloJSConfig := functionsConfig ["hello-js-function-test" ]
686697
0 commit comments