client/http: add additional tests

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-03-30 18:34:04 +03:00
parent 9c457a0c5e
commit d3a0375892
5 changed files with 86 additions and 13 deletions

View File

@@ -16,13 +16,21 @@ func NewGithubEndpoints() []*api.Endpoint {
Method: []string{"GET"},
Handler: "rpc",
},
&api.Endpoint{
Name: "Github.LookupUserWithoutPath",
Path: []string{"/{username}"},
Method: []string{"GET"},
Handler: "rpc",
},
}
}
type GithubClient interface {
LookupUser(ctx context.Context, req *LookupUserReq, opts ...client.CallOption) (*LookupUserRsp, error)
LookupUserWithoutPath(ctx context.Context, req *LookupUserReq, opts ...client.CallOption) (*LookupUserRsp, error)
}
type GithubServer interface {
LookupUser(ctx context.Context, req *LookupUserReq, rsp *LookupUserRsp) error
LookupUserWithoutPath(ctx context.Context, req *LookupUserReq, rsp *LookupUserRsp) error
}