testutil

package
v0.1.0-alpha4 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package testutil provides utility functions that reduce duplicated code in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any

func Any(t *testing.T, m proto.Message) *anypb.Any

Any converts the provided proto.Message into an anypb.Any.

func BoltDB

func BoltDB(t *testing.T) *bbolt.DB

BoltDB returns a new boltdb database in a temporary directory that is removed from-disk once the test is complete.

func Context

func Context(t *testing.T) context.Context

Context returns a new context.Context that is cancelled when the test is complete.

Types

This section is empty.

Jump to

Keyboard shortcuts

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