testutil

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: MIT Imports: 9 Imported by: 33

README

go-testutil

Discourse posts Travis CI

A collection of testing utilities for ipfs and libp2p

Install

go get github.com/libp2p/go-testutil

Usage

See the documentation.

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

Want to hack on IPFS?

License

MIT © Protocol Labs, Inc.


The last gx published version of this module was: 1.2.19: QmWapVoHjtKhn4MhvKNoPTkJKADFGACfXPFnt7combwp5W

Documentation

Overview

Deprecated: use github.com/libp2p/go-libp2p-testing and subpackages instead.

Index

Constants

This section is empty.

Variables

View Source
var SeededRand = tetc.SeededRand

Deprecated: use github.com/libp2p/go-libp2p-testing/etc.SeededRand instead.

Functions

func NewSeededRand deprecated

func NewSeededRand(seed int64) *rand.Rand

Deprecated: use github.com/libp2p/go-libp2p-testing/etc.NewSeededRand instead.

func RandLocalTCPAddress deprecated

func RandLocalTCPAddress() ma.Multiaddr

Deprecated: use github.com/libp2p/go-libp2p-testing/net.RandLocalTCPAddress instead.

func RandPeerID deprecated

func RandPeerID() (peer.ID, error)

Deprecated: use github.com/libp2p/go-libp2p-core/test.RandPeerID instead.

func RandPeerIDFatal deprecated

func RandPeerIDFatal(t testing.TB) peer.ID

Deprecated: use github.com/libp2p/go-libp2p-core/test.RandPeerIDFatal instead.

func RandTestKeyPair deprecated

func RandTestKeyPair(bits int) (ci.PrivKey, ci.PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/test.RandTestKeyPair instead. Supply RSA as a key type to get an equivalent result.

func SeededTestKeyPair deprecated

func SeededTestKeyPair(seed int64) (ci.PrivKey, ci.PubKey, error)

Deprecated: use github.com/libp2p/go-libp2p-core/test.SeededTestKeyPair instead. Supply RSA as a key type, with 512 bits, to get an equivalent result.

func WaitFor deprecated

func WaitFor(ctx context.Context, check func() error) error

Deprecated: use github.com/libp2p/go-libp2p-testing/etc.WaitFor instead.

Types

type Identity deprecated

type Identity = tnet.Identity

Deprecated: use github.com/libp2p/go-libp2p-testing/net.Identity instead.

func NewIdentity deprecated

func NewIdentity(ID peer.ID, addr ma.Multiaddr, privk ci.PrivKey, pubk ci.PubKey) Identity

Deprecated: use github.com/libp2p/go-libp2p-testing/net.NewIdentity instead.

func RandIdentity deprecated

func RandIdentity() (Identity, error)

Deprecated: use github.com/libp2p/go-libp2p-testing/net.RandIdentity instead.

func RandIdentityOrFatal deprecated

func RandIdentityOrFatal(t *testing.T) Identity

Deprecated: use github.com/libp2p/go-libp2p-testing/net.RandIdentityOrFatal instead.

type LatencyConfig deprecated

type LatencyConfig = tnet.LatencyConfig

Deprecated: use github.com/libp2p/go-libp2p-testing/net.LatencyConfig instead.

type LockedRandSource deprecated

type LockedRandSource = tetc.LockedRandSource

Deprecated: use github.com/libp2p/go-libp2p-testing/etc.LockedRandSource instead.

type PeerNetParams deprecated

type PeerNetParams = tnet.PeerNetParams

Deprecated: use github.com/libp2p/go-libp2p-testing/net.PeerNetParams instead.

func RandPeerNetParams deprecated

func RandPeerNetParams() (*PeerNetParams, error)

Deprecated: use github.com/libp2p/go-libp2p-testing/net.RandPeerNetParams instead.

func RandPeerNetParamsOrFatal deprecated

func RandPeerNetParamsOrFatal(t *testing.T) PeerNetParams

Deprecated: use github.com/libp2p/go-libp2p-testing/net.RandPeerNetParamsOrFatal instead.

Directories

Path Synopsis
ci
Deprecated: use github.com/libp2p/go-libp2p-testing/ci instead.
Deprecated: use github.com/libp2p/go-libp2p-testing/ci instead.
travis
Deprecated: use github.com/libp2p/go-libp2p-testing/ci/travis instead.
Deprecated: use github.com/libp2p/go-libp2p-testing/ci/travis instead.

Jump to

Keyboard shortcuts

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