Versions in this module Expand all Collapse all v1 v1.3.2 Mar 13, 2018 Changes in this version + var MinerTemplate = node.NodeParams + var SiaTestingDir = filepath.Join(os.TempDir(), "SiaTesting") + func Fuzz() int + func Miner(dir string) node.NodeParams + func Retry(tries int, durationBetweenAttempts time.Duration, fn func() error) (err error) + func TestDir(dirs ...string) (string, error) + type GroupParams struct + Hosts int + Miners int + Renters int + type LocalFile struct + func NewFile(size int) (*LocalFile, error) + type RemoteFile struct + type TestGroup struct + func NewGroup(nodeParams ...node.NodeParams) (*TestGroup, error) + func NewGroupFromTemplate(groupParams GroupParams) (*TestGroup, error) + func (tg *TestGroup) Close() error + func (tg *TestGroup) Hosts() []*TestNode + func (tg *TestGroup) Miners() []*TestNode + func (tg *TestGroup) Nodes() []*TestNode + func (tg *TestGroup) Renters() []*TestNode + type TestNode struct + func NewCleanNode(nodeParams node.NodeParams) (*TestNode, error) + func NewNode(nodeParams node.NodeParams) (*TestNode, error) + func (tn *TestNode) DownloadByStream(rf *RemoteFile) (data []byte, err error) + func (tn *TestNode) DownloadInfo(lf *LocalFile, rf *RemoteFile) (*api.DownloadInfo, error) + func (tn *TestNode) DownloadToDisk(rf *RemoteFile, async bool) (*LocalFile, error) + func (tn *TestNode) FileInfo(rf *RemoteFile) (modules.FileInfo, error) + func (tn *TestNode) Files() ([]modules.FileInfo, error) + func (tn *TestNode) MineBlock() error + func (tn *TestNode) Upload(lf *LocalFile, dataPieces, parityPieces uint64) (*RemoteFile, error) + func (tn *TestNode) UploadNewFile(filesize int, dataPieces uint64, parityPieces uint64) (rf *RemoteFile, err error) + func (tn *TestNode) UploadNewFileBlocking(filesize int, dataPieces uint64, parityPieces uint64) (rf *RemoteFile, err error) + func (tn *TestNode) WaitForDownload(lf *LocalFile, rf *RemoteFile) error + func (tn *TestNode) WaitForUploadProgress(rf *RemoteFile, progress float64) error + func (tn *TestNode) WaitForUploadRedundancy(rf *RemoteFile, redundancy float64) error