add more tests

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-04-19 02:16:00 +03:00
parent c526fdb749
commit 1fc599fc0d
7 changed files with 204 additions and 82 deletions

View File

@@ -30,6 +30,13 @@ type TestDoubleServer interface {
func NewTestEndpoints() []*api.Endpoint {
return []*api.Endpoint{
&api.Endpoint{
Name: "Test.CallRepeated",
Path: []string{"/v1/test/call_repeated/{ids}"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
&api.Endpoint{
Name: "Test.Call",
Path: []string{"/v1/test/call/{name}"},
@@ -48,11 +55,13 @@ func NewTestEndpoints() []*api.Endpoint {
}
type TestClient interface {
CallRepeated(ctx context.Context, req *CallReq, opts ...client.CallOption) (*CallRsp, error)
Call(ctx context.Context, req *CallReq, opts ...client.CallOption) (*CallRsp, error)
CallError(ctx context.Context, req *CallReq1, opts ...client.CallOption) (*CallRsp1, error)
}
type TestServer interface {
CallRepeated(ctx context.Context, req *CallReq, rsp *CallRsp) error
Call(ctx context.Context, req *CallReq, rsp *CallRsp) error
CallError(ctx context.Context, req *CallReq1, rsp *CallRsp1) error
}