mockapp

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTestBlobStore

func CreateTestBlobStore(t *testing.T) (blob.Store, func())

func CreateTestDB

func CreateTestDB(t *testing.T) (*leveldb.DB, func())

func FillBlobRandom

func FillBlobRandom(t *testing.T, db *leveldb.DB, bs blob.Store, signer crypto.Signer, name string, ts time.Time, receivedAt time.Time) *wire.Update

func FillBlobReader

func FillBlobReader(t *testing.T, db *leveldb.DB, bs blob.Store, signer crypto.Signer, name string, ts time.Time, receivedAt time.Time, r io.Reader) *wire.Update

func RequireBlobsEqual

func RequireBlobsEqual(t *testing.T, localBS blob.Store, remoteBS blob.Store, name string)

Types

type AdditionalPeer

type AdditionalPeer struct {
	LocalPeer  p2p.Peer
	RemotePeer p2p.Peer
	Signer     crypto.Signer
	Mux        *p2p.PeerMuxer
}

func ConnectAdditionalPeer

func ConnectAdditionalPeer(t *testing.T, localSigner crypto.Signer, localMux *p2p.PeerMuxer) (*AdditionalPeer, func())

type TestPeers

type TestPeers struct {
	LocalPeer    p2p.Peer
	RemotePeer   p2p.Peer
	LocalSigner  crypto.Signer
	RemoteSigner crypto.Signer
	LocalMux     *p2p.PeerMuxer
	RemoteMux    *p2p.PeerMuxer
}

func ConnectTestPeers

func ConnectTestPeers(t *testing.T) (*TestPeers, func())

type TestStorage

type TestStorage struct {
	BlobStore blob.Store
	DB        *leveldb.DB
}

func CreateStorage

func CreateStorage(t *testing.T) (*TestStorage, func())

Jump to

Keyboard shortcuts

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