testutils

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DevicesFromJSON added in v0.5.3

func DevicesFromJSON(path string, m device.Transport) (func(), error)

DevicesFromJSON creates fake devices on the broker based on the devices defined in a JSON file When you run the returned cleanup function it will delete the devices. Note that unless you then also close the transport it might still announce the device(s) when it receives a discover.

func MQTTAddress added in v0.5.1

func MQTTAddress(t *testing.T) string

MQTTAddress is a helper function that will try to connect to an MQTT broker on MQTT_ADDRESS and if successful return the address. It should only be used in Bibliotek's own tests or other Hemtjanst component tests

Types

This section is empty.

Jump to

Keyboard shortcuts

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