test

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLIENT_APPLICATION_HTTP_HOST = "localhost:40050"
	CLIENT_APPLICATION_GRPC_HOST = "localhost:40051"
	VERSION                      = "v0.0.1-test"
	BUILD_DATE                   = "1.1.1970"
	COMMIT_HASH                  = "aaa"
)

Variables

View Source
var (
	MFG_ROOT_CA_CRT            = os.Getenv("MFG_ROOT_CA_CRT")
	MFG_CLIENT_APPLICATION_CRT = os.Getenv("MFG_CLIENT_APPLICATION_CRT")
	MFG_CLIENT_APPLICATION_KEY = os.Getenv("MFG_CLIENT_APPLICATION_KEY")
)
View Source
var DevsimName string

Functions

func FindDeviceByName

func FindDeviceByName(name string, useMulticast []pb.GetDevicesRequest_UseMulticast) (*grpcgwPb.Device, error)
func GetDeviceResourceLinks() schema.ResourceLinks

func MakeConfig

func MakeConfig(t require.TestingT) service.Config

func MakeDeviceConfig

func MakeDeviceConfig() serviceDevice.Config

func MakeGrpcConfig

func MakeGrpcConfig() service.GRPCConfig

func MakeHttpConfig

func MakeHttpConfig() service.HTTPConfig

func MustFindDeviceByName

func MustFindDeviceByName(name string, useMulticast []pb.GetDevicesRequest_UseMulticast) *grpcgwPb.Device

func MustGetHostname

func MustGetHostname() string

func New

func New(t *testing.T, cfg service.Config) func()

New creates test coap-gateway.

func NewClientApplicationServer

func NewClientApplicationServer(ctx context.Context, opts ...ClientApplicationServerOpt) (*serviceGrpc.ClientApplicationServer, func(), error)

func NewHttpService

func NewHttpService(ctx context.Context, t *testing.T) (*http.Service, func())

func NewServiceInformation added in v0.0.6

func NewServiceInformation() *serviceGrpc.ServiceInformation

func SetUp

func SetUp(t *testing.T) (tearDown func())

Types

type ClientApplicationGetDevicesServer

type ClientApplicationGetDevicesServer struct {
	grpc.ServerStream
	Devices []*grpcgwPb.Device
	Ctx     context.Context
}

func NewClientApplicationGetDevicesServer

func NewClientApplicationGetDevicesServer(ctx context.Context) *ClientApplicationGetDevicesServer

func (*ClientApplicationGetDevicesServer) Context

func (*ClientApplicationGetDevicesServer) Send

type ClientApplicationServerCfg added in v0.1.0

type ClientApplicationServerCfg struct {
	Cfg serviceDevice.Config
}

type ClientApplicationServerOpt added in v0.1.0

type ClientApplicationServerOpt = func(c *ClientApplicationServerCfg)

func WithDeviceConfig added in v0.1.0

func WithDeviceConfig(cfg serviceDevice.Config) ClientApplicationServerOpt

Jump to

Keyboard shortcuts

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