package
1.24.0
Repository: https://github.com/ferretdb/ferretdb.git
Documentation: pkg.go.dev

# Packages

Package testfail provides testing helpers for expected tests failures.
Package teststress provides a helper for stress testing.
Package testtb provides a common testing interface.

# Functions

AssertEqual asserts that two BSON values are equal.
AssertEqualSlices asserts that two BSON slices are equal.
AssertNotEqual asserts that two BSON values are not equal.
AssertNotEqualSlices asserts that two BSON slices are not equal.
CollectionName returns a stable FerretDB collection name for that test.
CompareAndSetByPathNum asserts that two values with the same path in two objects (documents or arrays) are within a given numerical delta, then updates the expected object with the actual value.
CompareAndSetByPathTime asserts that two values with the same path in two objects (documents or arrays) are within a given time delta, then updates the expected object with the actual value.
Ctx returns test context.
DatabaseName returns a stable FerretDB database name for that test.
DirectoryName returns a stable directory name for that test.
GetByPath returns a value by path - a sequence of indexes and keys.
IndentJSON returns an indented form of the JSON input.
LevelLogger returns a test logger for the given level (which might be dynamic).
Logger returns slog test logger.
MustParseDumpFile panics if fails to parse file input to byte array.
SetByPath sets the value by path - a sequence of indexes and keys.
TestHanaURI returns a HANA Database URL for testing.
TestMySQLURI returns MySQL URI with test-specific database.
TestPostgreSQLURI returns PostgreSQL URI with test-specific database.
TestSQLiteURI returns SQLite URI with test-specific directory.
Unindent removes the common number of leading tabs from all lines in s.

# Variables

BinDir is the <root>/bin directory.
BuildCertsDir is the <root>/build/certs directory.
IntegrationDir is the <root>/integration directory.
RootDir is the FerretDB <root> directory.
TmpRecordsDir is the <root>/tmp/records directory.