qri: github.com/qri-io/qri/config/test Index | Files

package test

import "github.com/qri-io/qri/config/test"

Package test contains predefined set of PeerInfo for testing. Generating private keys is computationally expensive, which slows down tests dramatically. Using a cache of pre-calculated private keys defined here to keeps tests fast.

Index

Package Files

test_peers.go

type EncodedPeerInfo Uses

type EncodedPeerInfo struct {
    Base64PrivKey string
    B58PeerID     string
}

EncodedPeerInfo holds encoded private keys and peerIDs for test peers.

type PeerInfo Uses

type PeerInfo struct {
    PrivKey        crypto.PrivKey
    PubKey         crypto.PubKey
    PeerID         peer.ID
    EncodedPrivKey string
    EncodedPeerID  string
}

PeerInfo holds deencoded keys and peerIDs for test peers.

func GetTestPeerInfo Uses

func GetTestPeerInfo(i int) *PeerInfo

GetTestPeerInfo gets PeerInfo for constructing a peer for testing.

Package test imports 3 packages (graph) and is imported by 3 packages. Updated 2019-06-27. Refresh now. Tools for package owners.