testhelpers

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindJSONFilesInDir

func FindJSONFilesInDir(t *testing.T, dir string) []string

FindJSONFilesInDir finds the JSON files in a directory.

func GetIntFromInterface

func GetIntFromInterface(i interface{}) *int64

GetIntFromInterface attempts to convert an empty interface value to an integer.

Returns nil if it is not possible.

func IsNil

func IsNil(object interface{}) bool

IsNil returns true if the object is nil

func RequireNil

func RequireNil(t *testing.T, variable interface{}, msgFormat string, msgVars ...interface{})

RequireNil throws an error if var is not nil

func RequireNoErrorOnClose

func RequireNoErrorOnClose(t *testing.T, c io.Closer)

RequireNoErrorOnClose ensures there is not an error when calling Close.

func RequireNotNil

func RequireNotNil(t *testing.T, variable interface{}, msgFormat string, msgVars ...interface{})

RequireNotNil throws an error if var is nil

func VerifyConnStringOptions

func VerifyConnStringOptions(t *testing.T, cs connstring.ConnString, options map[string]interface{})

VerifyConnStringOptions verifies the options on the connection string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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