mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Client generator update (#262)
* Generated a bunch of clients. * Builds go client. * Removed test line. * Changed dependencies to fnproject/fn_go * Fix tests.
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/funcy/functions_go/client/call"
|
||||
"github.com/fnproject/fn_go/client/call"
|
||||
)
|
||||
|
||||
func TestCalls(t *testing.T) {
|
||||
@@ -78,21 +78,15 @@ func TestCalls(t *testing.T) {
|
||||
}
|
||||
u.Path = path.Join(u.Path, "r", s.AppName, s.RoutePath)
|
||||
|
||||
callID := CallAsync(t, u, &bytes.Buffer{})
|
||||
time.Sleep(time.Second * 5)
|
||||
cfg := &call.GetCallsCallParams{
|
||||
Call: callID,
|
||||
Context: s.Context,
|
||||
}
|
||||
cfg.WithTimeout(time.Second * 60)
|
||||
_, err := s.Client.Call.GetAppsAppCalls(&call.GetAppsAppCallsParams{
|
||||
App: s.AppName,
|
||||
Route: &s.RoutePath,
|
||||
})
|
||||
if err != nil {
|
||||
switch err.(type) {
|
||||
case *call.GetCallsCallNotFound:
|
||||
msg := err.(*call.GetCallsCallNotFound).Payload.Error.Message
|
||||
case *call.GetAppsAppCallsCallNotFound:
|
||||
msg := err.(*call.GetAppsAppCallsCallNotFound).Payload.Error.Message
|
||||
t.Errorf("Unexpected error occurred: %v.", msg)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user