Documentation
¶
Overview ¶
Miscellaneous helpful functions to make testing easier with less boilerplate.
Index ¶
- func CheckError(t *testing.T, msg string, err error)
- func ExampleRecord() arrow.Record
- func GetAuthToken() string
- func GetAuthType() string
- func GetHost() string
- func GetPort() string
- func RandomRecord(numCols int, numRows int, maxNum int) arrow.Record
- func RecordPrint(r arrow.Record)
- func RecordString(r arrow.Record) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
CheckError prints the passed error and message and fails the test if the given error is not nil.
func ExampleRecord ¶
ExampleRecord creates an arrow Record with some arbitrary data, used for testing. The returned Record should be released when it is not needed anymore.
func GetAuthToken ¶ added in v0.23.0
func GetAuthToken() string
GetAuthToken returns the auth token to use for the tests. By default it is "" but can be overridden by setting the DH_AUTH_TOKEN environment variable.
func GetAuthType ¶ added in v0.23.0
func GetAuthType() string
GetAuthType returns the auth type to use for the tests. By default it is Anonymous but can be overridden by setting the DH_AUTH_TYPE environment variable.
func GetHost ¶
func GetHost() string
GetHost returns the host to connect to for the tests. By default it is localhost, but can be overridden by setting the DH_HOST environment variable.
func GetPort ¶
func GetPort() string
GetPort returns the port to connect to for the tests. By default it is 10000, but can be overridden by setting the DH_PORT environment variable.
func RandomRecord ¶
RandomRecord creates an arrow record with random int32 values. It will have the specified number of rows and columns, each entry will be in the range [0, maxNum).
func RecordPrint ¶ added in v0.24.0
RecordPrint prints a record in a deterministic way that is safe to use for diffs.
func RecordString ¶ added in v0.24.0
RecordString returns a string representation of a record in a deterministic way that is safe to use for diffs.
Types ¶
This section is empty.