@@ -15,7 +15,7 @@ import (
1515
1616func TestInvocationHandlerWithData (t * testing.T ) {
1717 data := `{"name": "test", "data": hellow}`
18- s := newService ("" )
18+ s := newServer ("" , nil )
1919 err := s .AddServiceInvocationHandler ("/" , func (ctx context.Context , in * common.InvocationEvent ) (out * common.Content , err error ) {
2020 if in == nil || in .Data == nil || in .ContentType == "" {
2121 err = errors .New ("nil input" )
@@ -44,7 +44,7 @@ func TestInvocationHandlerWithData(t *testing.T) {
4444}
4545
4646func TestInvocationHandlerWithoutInputData (t * testing.T ) {
47- s := newService ("" )
47+ s := newServer ("" , nil )
4848 err := s .AddServiceInvocationHandler ("/" , func (ctx context.Context , in * common.InvocationEvent ) (out * common.Content , err error ) {
4949 if in == nil || in .Data != nil {
5050 err = errors .New ("nil input" )
@@ -69,7 +69,7 @@ func TestInvocationHandlerWithoutInputData(t *testing.T) {
6969}
7070
7171func TestInvocationHandlerWithInvalidRoute (t * testing.T ) {
72- s := newService ("" )
72+ s := newServer ("" , nil )
7373 err := s .AddServiceInvocationHandler ("/a" , func (ctx context.Context , in * common.InvocationEvent ) (out * common.Content , err error ) {
7474 return nil , nil
7575 })
0 commit comments