test

package
v0.0.0-...-ffe4551 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scope

type Scope struct {
	Config config.Config
	Env    environment.Environment

	Ctx context.Context
	Is  *is.I

	GRPCTestServer     *grpc.Server
	GRPCBufConn        *bufconn.Listener
	GRPCTestClient     servicev1.ToDoServiceClient
	GRPCTestClientConn *grpc.ClientConn

	HTTPTestServer *httptest.Server
	HTTPClient     *http.Client

	DB *pgxpool.Pool
	// contains filtered or unexported fields
}

func GetScope

func GetScope(t *testing.T) Scope

func NewScope

func NewScope(t *testing.T) (Scope, error)

func (*Scope) CleanupScope

func (s *Scope) CleanupScope(t *testing.T)

func (*Scope) NewDatabase

func (s *Scope) NewDatabase(t *testing.T) error

func (*Scope) SetGRPC

func (s *Scope) SetGRPC(t *testing.T, controller servicev1.ToDoServiceServer)

func (*Scope) SetHTTP

func (s *Scope) SetHTTP(t *testing.T, handler http.Handler)

Jump to

Keyboard shortcuts

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