fakereports

package
v0.0.0-...-b5d9cbe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package fakereports provides a fake implementation of Reports service for unit testing.

Index

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

func Start(t *testing.T, maxTestFailures int) (server *Server, stopFunc func(), addr string)

Start starts a gRPC server serving ReportsServer in the background for tests. Callers are responsible for stopping the server by stopFunc().

func (*Server) GetLog

func (s *Server) GetLog(test, logPath string) []byte

GetLog returns logs for a particular test.

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL