Documentation ¶
Index ¶
- Constants
- func AssertEqual(t *testing.T, expected interface{}, actual interface{})
- func AssertFalse(t *testing.T, object bool)
- func AssertNearEqual(t *testing.T, expected int64, actual int64, delta int64)
- func AssertNil(t *testing.T, object interface{})
- func AssertNotEqual(t *testing.T, expected interface{}, actual interface{})
- func AssertNotNil(t *testing.T, object interface{})
- func AssertNotPanics(t *testing.T, fn func())
- func AssertNotSame(t *testing.T, expected interface{}, actual interface{})
- func AssertSame(t *testing.T, expected interface{}, actual interface{})
- func AssertStringContains(t *testing.T, expectedContained string, actualContaining string)
- func AssertTrue(t *testing.T, object bool)
- func BindSentryClient(t *testing.T, tcp *http.Transport)
- func NewConfigWithBuffer(t *testing.T, logLevel log.Level) (*log.Config, *bytes.Buffer)
- func SentryServer(t *testing.T, logMessages bool) (fakesentry.Server, func(t *testing.T) []byte)
Constants ¶
const SentryDSN = `http://thisis:myfakeauth@localhost/1`
Variables ¶
This section is empty.
Functions ¶
func AssertEqual ¶
AssertEqual is a semantic test assertion for object equality.
func AssertFalse ¶
AssertFalse is a semantic test assertion for object truthiness.
func AssertNearEqual ¶
AssertNearEqual is a semantic test assertion for numeric accuracy.
func AssertNotEqual ¶
AssertNotEqual is a semantic test assertion for object equality.
func AssertNotNil ¶
AssertNotNil is a semantic test assertion for nility.
func AssertNotPanics ¶ added in v1.1.0
AssertNotPanics is a semantic test assertion that a function does not panic.
func AssertNotSame ¶
AssertNotSame is a semantic test assertion for referential equality.
func AssertSame ¶
AssertSame is a semantic test assertion for referential equality.
func AssertStringContains ¶
AssertStringContains is a semantic test assertion for partial string matching.
func AssertTrue ¶
AssertTrue is a semantic test assertion for object truthiness.
func BindSentryClient ¶
BindSentryClient attaches a Sentry server transport (from fake Sentry) to the Sentry SDK's CurrentHub .It assumes that a logger has been instantiated, which initializes the Sentry SDK. Note: this is data-race free but not race-condition free on the Sentry Hub. Use with caution from multiple goroutines.
func NewConfigWithBuffer ¶
NewConfigWithBuffer generates a default testing config (log.Level is set to log.INFO and EnableErrStack is true) and a linked output buffer that the logger writes too.
func SentryServer ¶
SentryServer generates a new fake Sentry server to field requests, and binds the "CurrentHub" client to it. The server instance is returned as well as a function that returns received messages (bytes) or times out and fails the test.
Types ¶
This section is empty.