mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 11:25:41 +03:00
code review
This commit is contained in:
@@ -142,4 +142,5 @@ func TestServerWithNodeConn_NoPathAndErr(t *testing.T) {
|
||||
srv, err := s1.serverWithNodeConn(uuid.Generate())
|
||||
require.Nil(srv)
|
||||
require.NotNil(err)
|
||||
require.Contains(err.Error(), "failed querying")
|
||||
}
|
||||
|
||||
@@ -80,6 +80,10 @@ func (s *ClientStats) Stats(args *structs.ClientStatsRequest, reply *structs.Cli
|
||||
return err
|
||||
}
|
||||
|
||||
if srv == nil {
|
||||
return ErrNoNodeConn
|
||||
}
|
||||
|
||||
return s.srv.forwardServer(srv, "ClientStats.Stats", args, reply)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user