AddCompressorToUri checks for the environment variable indicating that the tests are being run with compression enabled. If so, it returns a new URI with the necessary configuration
AddOptionsToURI appends connection string options to a URI.
AddTLSConfigToURI checks for the environmental variable indicating that the tests are being run on an SSL-enabled server, and if so, returns a new URI with the necessary configuration.
AutoCreateIndexes creates an index in the test cluster.
AutoDropCollection drops the collection in the test cluster.
func AutoInsertDocs(t *testing.T, writeConcern *writeconcern.WriteConcern, docs ...bsoncore.Document)
AutoInsertDocs inserts the docs into the test cluster.
ColName gets a collection name that should be unique to the currently executing test.
compareVersions compares two version number strings (i.e. positive integers separated by periods). Comparisons are done to the lesser precision of the two versions. For example, 3.2 is considered equal to 3.2.11, whereas 3.2.0 is considered less than 3.2.11.
Returns a positive int if version1 is greater than version2, a negative int if version1 is less than version2, and 0 if version1 is equal to version2.
ConnString gets the globally configured connection string.
DBName gets the globally configured database name.
DisableMaxTimeFailPoint turns off the max time fail point in the test cluster.
DropCollection drops the collection in the test cluster.
EnableMaxTimeFailPoint turns on the max time fail point in the test cluster.
GlobalMonitoredSessionPool returns the globally configured session pool. Must be called after GlobalMonitoredTopology()
GlobalMonitoredTopology gets the globally configured topology and attaches a command monitor.
func InsertDocs(t *testing.T, dbname, colname string, writeConcern *writeconcern.WriteConcern, docs ...bsoncore.Document)
InsertDocs inserts the docs into the test cluster.
Integration should be called at the beginning of integration tests to ensure that they are skipped if integration testing is turned off.
MonitoredTopology returns a new topology with the command monitor attached
RunCommand runs an arbitrary command on a given database of target server
SessionPool gets the globally configured session pool. Must be called after Topology().
Topology gets the globally configured topology.
TopologyWithConnString takes a connection string and returns a connected topology, or else bails out of testing
|israce||Package israce reports if the Go race detector is enabled.|