Documentation ¶
Index ¶
- Variables
- func AssertEqualJSON(t *testing.T, expected json.RawMessage, actual json.RawMessage, msg string, ...) bool
- func CreateSession(assetsJSON json.RawMessage, testServerURL string) (flows.Session, error)
- func CreateTestSession(testServerURL string, actionToAdd flows.Action) (flows.Session, []flows.Event, error)
- func NewChannel(name string, address string, schemes []string, roles []assets.ChannelRole, ...) *flows.Channel
- func NewField(key string, name string, valueType assets.FieldType) *flows.Field
- func NewGroup(name string, query string) *flows.Group
- func NewTelChannel(name string, address string, roles []assets.ChannelRole, ...) *flows.Channel
- func NewTestHTTPServer(port int) (*httptest.Server, error)
- func NormalizeJSON(data json.RawMessage) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var TestHTTPClient = utils.NewHTTPClient("goflow-testing")
TestHTTPClient a HTTP client instance for tests
Functions ¶
func AssertEqualJSON ¶ added in v0.23.0
func AssertEqualJSON(t *testing.T, expected json.RawMessage, actual json.RawMessage, msg string, msgArgs ...interface{}) bool
AssertEqualJSON checks two JSON strings for equality
func CreateSession ¶ added in v0.9.10
CreateSession creates a session with the given assets
func CreateTestSession ¶
func CreateTestSession(testServerURL string, actionToAdd flows.Action) (flows.Session, []flows.Event, error)
CreateTestSession creates a standard example session for testing
func NewChannel ¶ added in v0.15.0
func NewChannel(name string, address string, schemes []string, roles []assets.ChannelRole, parent *assets.ChannelReference) *flows.Channel
func NewTelChannel ¶ added in v0.15.0
func NewTelChannel(name string, address string, roles []assets.ChannelRole, parent *assets.ChannelReference, country string, matchPrefixes []string) *flows.Channel
func NewTestHTTPServer ¶
NewTestHTTPServer sets up a mock server for webhook actions
func NormalizeJSON ¶ added in v0.23.0
func NormalizeJSON(data json.RawMessage) ([]byte, error)
NormalizeJSON re-formats the given JSON
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.