bugsnag-go: github.com/bugsnag/bugsnag-go/testutil Index | Files

package testutil

import "github.com/bugsnag/bugsnag-go/testutil"

Package testutil can be .-imported to gain access to useful test functions.

Index

Package Files

json.go

Constants

const TestAPIKey = "166f5ad3590596f9aa8d601ea89af845"

TestAPIKey is a fake API key that can be used for testing

func AssertPayload Uses

func AssertPayload(t *testing.T, report *simplejson.Json, expPretty string)

AssertPayload compares the payload that was received by the event-server to the expected report JSON payload

func Get Uses

func Get(j *simplejson.Json, path string) *simplejson.Json

Get travels through a JSON object and returns the specified node

func GetIndex Uses

func GetIndex(j *simplejson.Json, path string, n int) *simplejson.Json

GetIndex returns the n-th element of the specified path inside the given JSON object

func Setup Uses

func Setup() (*httptest.Server, chan []byte)

Setup sets up and returns a test event server for receiving the event payloads. report payloads published to the returned server's URL will be put on the returned channel

Package testutil imports 7 packages (graph). Updated 2018-11-28. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).