test

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimeout = errors.New("timeout while waiting channel")

Functions

func Empty

func Empty(t *testing.T, o interface{})

func Equals

func Equals(t *testing.T, i any, l any)

func ErrorIs

func ErrorIs(t *testing.T, err error, target error)

func ErrorNotIs

func ErrorNotIs(t *testing.T, err error, target error)

func Len

func Len(t *testing.T, o interface{}, len1 int)

func Nil

func Nil(t *testing.T, o interface{}, msg ...string)

func NotEmpty

func NotEmpty(t *testing.T, o interface{})

func NotEquals

func NotEquals(t *testing.T, i any, l any)

func NotIsLen

func NotIsLen(t *testing.T, o interface{}, l int)

func NotNil

func NotNil(t *testing.T, o interface{})

func RestoreEnv added in v0.6.2

func RestoreEnv(b BackupEnvData)

func Setargs added in v0.6.2

func Setargs(args ...string)

func SetargsV added in v0.6.2

func SetargsV(name string, value string)

func WaitFor

func WaitFor[T any](ctx context.Context, ch <-chan T) (T, error)

func WaitForClosed

func WaitForClosed[T any](ctx context.Context, ch <-chan T) error

Types

type BackupEnvData added in v0.6.2

type BackupEnvData struct {
	// contains filtered or unexported fields
}

func DoBackupEnv added in v0.6.2

func DoBackupEnv() BackupEnvData

type ErrNotHealthy

type ErrNotHealthy struct {
	Addr string
}

func (ErrNotHealthy) Error

func (e ErrNotHealthy) Error() string

type ErrService

type ErrService struct {
	Starter Starter
	Err     error
}

func (ErrService) Error

func (e ErrService) Error() string

type HealthCheckClientBuilder

type HealthCheckClientBuilder interface {
	NewHealthCheckClient() (service.HealthChecker, error)
}

type ServiceGroup

type ServiceGroup struct {
	// contains filtered or unexported fields
}

func NewServiceGroup

func NewServiceGroup() *ServiceGroup

func (*ServiceGroup) Start

func (s *ServiceGroup) Start(starters ...Starter) error

func (*ServiceGroup) WaitUntilStopped

func (s *ServiceGroup) WaitUntilStopped() error

type Starter

type Starter interface {
	Start() error
	Addr() string
}

Jump to

Keyboard shortcuts

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