Documentation
¶
Index ¶
- Variables
- func BeforeOnce(beforeBlock func())
- func Delete(app *api.App, url string) (int, string)
- func FHTTPMeasure(description string, setup func(map[string]interface{}), ...) bool
- func FastDelete(url string) (int, []byte, error)
- func FastGet(url string) (int, []byte, error)
- func FastPatchTo(url string, payload []byte) (int, []byte, error)
- func FastPostTo(url string, payload []byte) (int, []byte, error)
- func FastPutTo(url string, payload []byte) (int, []byte, error)
- func Get(app *api.App, url string, headersKv ...string) (int, string)
- func GetDefaultTestApp() *api.App
- func GetDefaultTestAppWithFaultyRedis() *api.App
- func GetRoute(httpEndPoint string, url string) string
- func GetTestingRedis(app *api.App) (redis.Client, error)
- func HTTPMeasure(description string, setup func(map[string]interface{}), ...) bool
- func InitializeTestServer(app *api.App)
- func MockStdout()
- func NewEmptyCtx() context.Context
- func Patch(app *api.App, url, body string) (int, string)
- func PatchJSON(app *api.App, url string, body interface{}) (int, string)
- func Post(app *api.App, url, body string) (int, string)
- func PostJSON(app *api.App, url string, body interface{}) (int, string)
- func Put(app *api.App, url, body string) (int, string)
- func PutJSON(app *api.App, url string, body interface{}) (int, string)
- func SetupGRPC(app *api.App, f func(pb.PodiumClient))
- func ShutdownDefaultTestApp()
- func ShutdownDefaultTestAppWithFaltyRedis()
- func XHTTPMeasure(description string, setup func(map[string]interface{}), ...) bool
- type TestBuffer
Constants ¶
This section is empty.
Variables ¶
var ReadStdout func() string
ReadStdout value
var ResetStdout func()
ResetStdout back to os.Stdout
Functions ¶
func BeforeOnce ¶
func BeforeOnce(beforeBlock func())
BeforeOnce runs the before each block only once
func FHTTPMeasure ¶
func FHTTPMeasure(description string, setup func(map[string]interface{}), f func(string, map[string]interface{}), timeout float64) bool
FHTTPMeasure runs the specified specs in an http test
func FastDelete ¶
FastDelete performs a DELETE on an URL
func FastPatchTo ¶
FastPatchTo performs a PATCH on an URL
func FastPostTo ¶
FastPostTo performs a POST on an URL
func GetDefaultTestAppWithFaultyRedis ¶
GetDefaultTestAppWithFaultyRedis returns a new podium API Application bound to 0.0.0.0:8890 for test but with a failing Redis
func GetTestingRedis ¶
GetTestingRedis creates a redis instance based on the default app configuration
func HTTPMeasure ¶
func HTTPMeasure(description string, setup func(map[string]interface{}), f func(string, map[string]interface{}), timeout float64) bool
HTTPMeasure runs the specified specs in an http test
func InitializeTestServer ¶
InitializeTestServer starts the test server
func NewEmptyCtx ¶
NewEmptyCtx Creates an empty context (shortcut for context.Background())
func SetupGRPC ¶
func SetupGRPC(app *api.App, f func(pb.PodiumClient))
SetupGRPC sets up the environment for grpc communication, starting the app and creating a connected client
func ShutdownDefaultTestApp ¶
func ShutdownDefaultTestApp()
ShutdownDefaultTestApp turn off default test app
func ShutdownDefaultTestAppWithFaltyRedis ¶
func ShutdownDefaultTestAppWithFaltyRedis()
ShutdownDefaultTestAppWithFaltyRedis turn off default test app
Types ¶
type TestBuffer ¶
TestBuffer is a mock buffer