testutil

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const TestPrivateKeyHex = "" /* 160-byte string literal not displayed */
View Source
const TestWalletAddr = "f1fib3pv7jua2ockdugtz7viz3cyy6lkhh7rfx3sa"

Variables

View Source
var SupportedTestDialects = []string{"sqlite", "mysql", "postgres"}
View Source
var TestCid = cid.NewCidV1(cid.Raw, util.Hash([]byte("test")))

Functions

func All added in v0.4.0

func All(t *testing.T, testFunc func(ctx context.Context, t *testing.T, db *gorm.DB))

func EscapePath added in v0.4.0

func EscapePath(p string) string

func GenerateFixedBytes added in v0.4.0

func GenerateFixedBytes(length int) []byte

func GenerateRandomBytes

func GenerateRandomBytes(n int) []byte

func GetFileTimestamp

func GetFileTimestamp(t *testing.T, path string) int64

func One added in v0.4.0

func One(t *testing.T, testFunc func(ctx context.Context, t *testing.T, db *gorm.DB))

func OneWithoutReset added in v0.4.0

func OneWithoutReset(t *testing.T, testFunc func(ctx context.Context, t *testing.T, db *gorm.DB))

func RandomLetterString added in v0.4.0

func RandomLetterString(length int) string

Types

type CloserFunc added in v0.4.0

type CloserFunc func() error

func (CloserFunc) Close added in v0.4.0

func (f CloserFunc) Close() error

Jump to

Keyboard shortcuts

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