testutil

package
v0.0.0-...-4101898 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module defines a reusable module so that we do not need to manually provide all the dependencies in every test suite. It also provides test-specific defaults. Module DOES NOT include servertest.Module. Use ModuleWithAPI for that instead.

View Source
var ModuleWithHTTP = fx.Module(
	"testutil-with-http",

	Module,
	grpc.Module,
	resttest.Module,
	grpclient.Module,
)

ModuleWithHTTP injects the main testutil.Module plus REST & GRPC related modules. It is intended to be used in test suites that require server interactions, as it also turns on the API server, manages its lifecycle, and waits for it to be ready before running tests.

Functions

func DeleteData

func DeleteData(ctx context.Context, db *sql.DB) error

DeleteData deletes all entities from the test database.

Types

This section is empty.

Jump to

Keyboard shortcuts

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