mongo-driver: go.mongodb.org/mongo-driver/internal/testutil/helpers Index | Files

package testhelpers

import "go.mongodb.org/mongo-driver/internal/testutil/helpers"

Index

Package Files

helpers.go

func FindJSONFilesInDir Uses

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

FindJSONFilesInDir finds the JSON files in a directory.

func GetIntFromInterface Uses

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 Uses

func IsNil(object interface{}) bool

IsNil returns true if the object is nil

func RequireNil Uses

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

RequireNil throws an error if var is not nil

func RequireNoErrorOnClose Uses

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

RequireNoErrorOnClose ensures there is not an error when calling Close.

func RequireNotNil Uses

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

RequireNotNil throws an error if var is nil

func VerifyConnStringOptions Uses

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

VerifyConnStringOptions verifies the options on the connection string.

Package testhelpers imports 11 packages (graph). Updated 2019-10-07. Refresh now. Tools for package owners.