Documentation
¶
Overview ¶
Package fakereports provides a fake implementation of Reports service for unit testing.
Index ¶
- type Server
- func (s *Server) GetLog(test, logPath string) []byte
- func (s *Server) LogStream(stream protocol.Reports_LogStreamServer) error
- func (s *Server) ReportResult(ctx context.Context, req *protocol.ReportResultRequest) (*protocol.ReportResultResponse, error)
- func (s *Server) Results() []*protocol.ReportResultRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server provides a fake resports server to test reports client implementation.
func Start ¶
Start starts a gRPC server serving ReportsServer in the background for tests. Callers are responsible for stopping the server by stopFunc().
func (*Server) LogStream ¶
func (s *Server) LogStream(stream protocol.Reports_LogStreamServer) error
LogStream provides a means for reports clients to test LogStream requests.
func (*Server) ReportResult ¶
func (s *Server) ReportResult(ctx context.Context, req *protocol.ReportResultRequest) (*protocol.ReportResultResponse, error)
ReportResult provides a means for reports clients to test ReportResult requests.
func (*Server) Results ¶
func (s *Server) Results() []*protocol.ReportResultRequest
Results returns all results have been received for this server.
Click to show internal directories.
Click to hide internal directories.