testutils

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MongodbReplsetName    = os.Getenv(envMongoDBReplsetName)
	MongodbHost           = "127.0.0.1"
	MongodbHostname       = "localhost"
	MongodbPrimaryPort    = os.Getenv(envMongoDBPrimaryPort)
	MongodbSecondary1Port = os.Getenv(envMongoDBSecondary1Port)
	MongodbSecondary2Port = os.Getenv(envMongoDBSecondary2Port)
	MongodbAdminUser      = os.Getenv(envMongoDBAdminUser)
	MongodbAdminPassword  = os.Getenv(envMongoDBAdminPassword)
	MongodbTimeout        = time.Duration(10) * time.Second
)

Functions

func DoSkipTest

func DoSkipTest(t *testing.T)

DoSkipTest handles the conditional skipping of tests, based on the output of .Enabled()

func Enabled

func Enabled() bool

Enabled returns a boolean reflecting whether testing against Mongodb should occur

func GetSession

func GetSession(port string) (*mgo.Session, error)

GetSession returns a *mgo.Session configured for testing against a MongoDB Primary

Types

This section is empty.

Jump to

Keyboard shortcuts

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