testutils

package
v0.0.0-...-2898a4c Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSilentLogger

func NewSilentLogger() *log.Logger

NewSilentLogger returns a cheap logger that doesn't print anything, useful for tests.

func RandomDataAndDigest

func RandomDataAndDigest(size int64) ([]byte, pb.Digest)

func RandomDataAndHash

func RandomDataAndHash(size int64) ([]byte, string)

RandomDataAndHash creates a random blob of the specified size, and returns that blob along with its sha256 hash.

func TempDir

func TempDir(t *testing.T) string

TempDir creates a temporary directory and returns its name. If an error occurs, then it panics.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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