testings

package
v0.0.0-...-047823a Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMongoDB

func GetMongoDB(ctx context.Context, uri string) (*mongo.Client, error)

GetMongoDB returns a mongo DB database for testing

func GetSeededPGDB

func GetSeededPGDB(seedSQL string) (*pgxpool.Pool, error)

GetSeededPGDB returns a connection to seeded postgres DB for testing, DDLs are executed externally before this step

func Ok

func Ok(t *testing.T, err error)

Ok tests if there is no error

Types

type ErrCheck

type ErrCheck func(*testing.T, error)

ErrCheck is a function to check errors in tests

func ErrorIs

func ErrorIs(want error) ErrCheck

ErrorIs checks if an error is of a given type

func ErrorSays

func ErrorSays(str string) ErrCheck

ErrorSays checks if an error content is expected

Jump to

Keyboard shortcuts

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