test

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 31 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"
	PSK_OWNER                    = "57b3fae9-adf5-4e34-90ea-e77784407103"
)

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 *testing.T) config.Config

func MakeConfig2 added in v0.3.0

func MakeConfig2() (config.Config, error)

func MakeDeviceConfig

func MakeDeviceConfig() configDevice.Config

func MakeGrpcConfig

func MakeGrpcConfig() config.GRPCConfig

func MakeHttpConfig

func MakeHttpConfig() config.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 config.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 NewRemoteProvisioningConfig added in v0.4.0

func NewRemoteProvisioningConfig() *pb.RemoteProvisioning

func NewServiceInformation added in v0.0.6

func NewServiceInformation() *pb.GetConfigurationResponse

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                   configDevice.Config
	RemoteProvisioningCfg *pb.RemoteProvisioning
}

type ClientApplicationServerOpt added in v0.1.0

type ClientApplicationServerOpt = func(c *ClientApplicationServerCfg)

func WithDeviceConfig added in v0.1.0

func WithDeviceConfig(cfg configDevice.Config) ClientApplicationServerOpt

func WithRemoteProvisioningConfig added in v0.2.0

func WithRemoteProvisioningConfig(cfg *pb.RemoteProvisioning) ClientApplicationServerOpt

Jump to

Keyboard shortcuts

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