testing

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeforeOnce added in v0.3.0

func BeforeOnce(beforeBlock func())

BeforeOnce runs the before each block only once

func FHTTPMeasure added in v0.3.0

func FHTTPMeasure(description string, setup func(map[string]interface{}), f func(*httptest.Server, map[string]interface{}), timeout float64) bool

FHTTPMeasure runs the specified specs in an http test

func Get added in v0.3.0

func Get(app *api.App, url string) (int, string)

Get returns a test request against specified URL

func GetDefaultTestApp added in v0.3.0

func GetDefaultTestApp() *api.App

GetDefaultTestApp returns a new arkadiko API Application bound to 0.0.0.0:8888 for test

func GetDefaultTestServer added in v0.4.0

func GetDefaultTestServer() (*remote.Server, error)

GetDefaultTestServer returns a new arkadiko RPC Server bound to 0.0.0.0:8891 for test

func GetRPCTestClient added in v0.4.0

func GetRPCTestClient(portOrNil ...int) (remote.MQTTClient, error)

GetRPCTestClient returns a connected test client

func HTTPMeasure added in v0.3.0

func HTTPMeasure(description string, setup func(map[string]interface{}), f func(*httptest.Server, map[string]interface{}), timeout float64) bool

HTTPMeasure runs the specified specs in an http test

func InitializeTestServer added in v0.3.0

func InitializeTestServer(app *api.App) *httptest.Server

InitializeTestServer method

func PostBody added in v0.3.0

func PostBody(app *api.App, url string, payload string) (int, string)

PostBody returns a test request against specified URL

func PostJSON added in v0.3.0

func PostJSON(app *api.App, url string, payload interface{}) (int, string)

PostJSON returns a test request against specified URL

func XHTTPMeasure added in v0.3.0

func XHTTPMeasure(description string, setup func(map[string]interface{}), f func(*httptest.Server, map[string]interface{}), timeout float64) bool

XHTTPMeasure runs the specified specs in an http test

Types

This section is empty.

Jump to

Keyboard shortcuts

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