Documentation ¶
Index ¶
- Constants
- Variables
- func ClearDB(ctx context.Context, t *testing.T)
- func ConvertSchemaToPb(deviceID string, s []schema.ResourceLink) []pb.ResourceLink
- func DecodeCbor(t *testing.T, data []byte) interface{}
- func EncodeToCbor(t *testing.T, v interface{}) []byte
- func FindDeviceByName(ctx context.Context, name string) (deviceID string, _ error)
- func GetAllBackendResourceLinks() []schema.ResourceLink
- func GetRootCertificateAuthorities(t *testing.T) []*x509.Certificate
- func GetRootCertificatePool(t *testing.T) *x509.CertPool
- func MustFindDeviceByName(name string) (deviceID string)
- func MustGetHostname() string
- func NewGrpcGateway(t *testing.T, config refImpl.Config) func()
- func OnboardDevSim(ctx context.Context, t *testing.T, c pb.GrpcGatewayClient, deviceID string, ...) func()
- func ResourceLinksToExpectedPublishEvents(deviceID string, links []schema.ResourceLink) map[string]*pb.Event
- func SetUp(ctx context.Context, t *testing.T) (TearDown func())
- func SortResources(s []pb.ResourceLink) []pb.ResourceLink
- type SortResourcesByHref
Constants ¶
View Source
const AUTH_HOST = "localhost:7005"
View Source
const AUTH_HTTP_HOST = "localhost:7006"
View Source
const GRPC_HOST = "localhost:9086"
View Source
const GW_HOST = "localhost:55684"
View Source
const RESOURCE_AGGREGATE_HOST = "localhost:9083"
View Source
const RESOURCE_DIRECTORY_HOST = "localhost:9082"
View Source
const TEST_TIMEOUT = time.Second * 15
Variables ¶
View Source
var ( TestDeviceName string TestDevsimResources []schema.ResourceLink TestDevsimBackendResources []schema.ResourceLink )
Functions ¶
func ConvertSchemaToPb ¶
func ConvertSchemaToPb(deviceID string, s []schema.ResourceLink) []pb.ResourceLink
func DecodeCbor ¶
func EncodeToCbor ¶
func FindDeviceByName ¶
func GetAllBackendResourceLinks ¶
func GetAllBackendResourceLinks() []schema.ResourceLink
func GetRootCertificateAuthorities ¶
func GetRootCertificateAuthorities(t *testing.T) []*x509.Certificate
func MustFindDeviceByName ¶
func MustGetHostname ¶
func MustGetHostname() string
func OnboardDevSim ¶
func OnboardDevSim(ctx context.Context, t *testing.T, c pb.GrpcGatewayClient, deviceID string, gwHost string, expectedResources []schema.ResourceLink) func()
func SortResources ¶
func SortResources(s []pb.ResourceLink) []pb.ResourceLink
Types ¶
type SortResourcesByHref ¶
type SortResourcesByHref []pb.ResourceLink
func (SortResourcesByHref) Len ¶
func (a SortResourcesByHref) Len() int
func (SortResourcesByHref) Less ¶
func (a SortResourcesByHref) Less(i, j int) bool
func (SortResourcesByHref) Swap ¶
func (a SortResourcesByHref) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.