diff options
author | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2022-05-30 16:43:41 +0200 |
---|---|---|
committer | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2022-05-30 18:44:14 +0200 |
commit | a4112fac7b86fe09650d2bb57969fe46404edd7d (patch) | |
tree | 0fa6420d0e94ce0c293e9020dbc189f12da65526 /proxy | |
parent | f06c92da266e8a71c8720d92179cd2d2d56d1a27 (diff) |
test: Fix test dependancy
This patch updates the go.mod with missing dependancies
for running `make test`
It also addresses an issue in `proxy/server.go` where
make test would complain of the double newline at the
end of the message.
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Change-Id: Ia2b00ffa9ecc398ee0ff6af165141f04b0025d61
Diffstat (limited to 'proxy')
-rw-r--r-- | proxy/server.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/proxy/server.go b/proxy/server.go index 243001a..3e8b307 100644 --- a/proxy/server.go +++ b/proxy/server.go @@ -178,7 +178,7 @@ func (s *StatsRPC) serviceAvailable() bool { func (s *StatsRPC) GetStats(req StatsRequest, resp *StatsResponse) error { if !s.serviceAvailable() { - log.Println(statsErrorMsg) + log.Print(statsErrorMsg) return errors.New("server does not support 'get stats' at this time, try again later") } log.Debugf("StatsRPC.GetStats - REQ: %+v", req) @@ -338,7 +338,7 @@ type RPCStreamReqResp struct { func (s *BinapiRPC) NewAPIStream(req RPCStreamReqResp, resp *RPCStreamReqResp) error { if !s.serviceAvailable() { - log.Println(binapiErrorMsg) + log.Print(binapiErrorMsg) return errors.New("server does not support RPC calls at this time, try again later") } log.Debugf("BinapiRPC.NewAPIStream - REQ: %#v", req) @@ -363,7 +363,7 @@ func (s *BinapiRPC) NewAPIStream(req RPCStreamReqResp, resp *RPCStreamReqResp) e func (s *BinapiRPC) SendMessage(req RPCStreamReqResp, resp *RPCStreamReqResp) error { if !s.serviceAvailable() { - log.Println(binapiErrorMsg) + log.Print(binapiErrorMsg) return errors.New("server does not support RPC calls at this time, try again later") } log.Debugf("BinapiRPC.SendMessage - REQ: %#v", req) @@ -378,7 +378,7 @@ func (s *BinapiRPC) SendMessage(req RPCStreamReqResp, resp *RPCStreamReqResp) er func (s *BinapiRPC) ReceiveMessage(req RPCStreamReqResp, resp *RPCStreamReqResp) error { if !s.serviceAvailable() { - log.Println(binapiErrorMsg) + log.Print(binapiErrorMsg) return errors.New("server does not support RPC calls at this time, try again later") } log.Debugf("BinapiRPC.ReceiveMessage - REQ: %#v", req) @@ -394,7 +394,7 @@ func (s *BinapiRPC) ReceiveMessage(req RPCStreamReqResp, resp *RPCStreamReqResp) func (s *BinapiRPC) CloseStream(req RPCStreamReqResp, resp *RPCStreamReqResp) error { if !s.serviceAvailable() { - log.Println(binapiErrorMsg) + log.Print(binapiErrorMsg) return errors.New("server does not support RPC calls at this time, try again later") } log.Debugf("BinapiRPC.CloseStream - REQ: %#v", req) @@ -428,7 +428,7 @@ func (s *BinapiRPC) getStream(id uint32) (api.Stream, error) { func (s *BinapiRPC) Invoke(req BinapiRequest, resp *BinapiResponse) error { if !s.serviceAvailable() { - log.Println(binapiErrorMsg) + log.Print(binapiErrorMsg) return errors.New("server does not support 'invoke' at this time, try again later") } log.Debugf("BinapiRPC.Invoke - REQ: %#v", req) @@ -470,7 +470,7 @@ func (s *BinapiRPC) Invoke(req BinapiRequest, resp *BinapiResponse) error { func (s *BinapiRPC) Compatibility(req BinapiCompatibilityRequest, resp *BinapiCompatibilityResponse) error { if !s.serviceAvailable() { - log.Println(binapiErrorMsg) + log.Print(binapiErrorMsg) return errors.New("server does not support 'compatibility check' at this time, try again later") } log.Debugf("BinapiRPC.Compatiblity - REQ: %#v", req) |