test_tools

package
v0.34.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Miscellaneous helpful functions to make testing easier with less boilerplate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(t *testing.T, msg string, err error)

CheckError prints the passed error and message and fails the test if the given error is not nil.

func ExampleRecord

func ExampleRecord() arrow.Record

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

func RandomRecord(numCols int, numRows int, maxNum int) arrow.Record

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

func RecordPrint(r arrow.Record)

RecordPrint prints a record in a deterministic way that is safe to use for diffs.

func RecordString added in v0.24.0

func RecordString(r arrow.Record) string

RecordString returns a string representation of a record in a deterministic way that is safe to use for diffs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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