test

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LoggingChannelValue atomic.Value

Functions

func CaptureLogsForTest added in v0.3.6

func CaptureLogsForTest() func() []string

CaptureLogsForTest adds a logging listener which captures messages to an internal channel. Returns a function that ends log capturing and returns any captured messages. It's safe to call endCapture() multiple times, so a simple call pattern is:

endCapture := CaptureLogsForTest()
defer endCapture()				// ensure cleanup in case of test assert failures

/* some test code */

messages := endCapture()
/* do inspection of log messages */

func CaptureLogsForTestWithChannel added in v0.4.0

func CaptureLogsForTestWithChannel(messagesCh chan string) func() []string

func CreateExpiringQueue added in v0.3.4

func CreateExpiringQueue(t *testing.T, qd *atom.QueueDescription) (string, func())

func EnableStdoutLogging added in v0.3.6

func EnableStdoutLogging() func()

EnableStdoutLogging turns on logging to stdout for diagnostics.

func GetConnectionString added in v0.3.0

func GetConnectionString(t *testing.T) string

func GetConnectionStringForPremiumSB added in v1.0.1

func GetConnectionStringForPremiumSB(t *testing.T) string

func GetConnectionStringWithoutManagePerms added in v0.3.0

func GetConnectionStringWithoutManagePerms(t *testing.T) string

func RandomString

func RandomString(prefix string, length int) string

RandomString generates a random string with prefix

Types

This section is empty.

Jump to

Keyboard shortcuts

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