dcrregtest

package module
v0.0.0-...-2fb4c88 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2019 License: ISC Imports: 19 Imported by: 0

README

Decred regression testing

Build Status ISC License

Harbours a pre-configured test setup and unit-tests to run RPC-driven node tests.

Builds a testing harness crafting and executing integration tests by driving a dcrd and dcrwallet instances via the RPC interface.

Build

set GO111MODULE=on
go build ./...
go clean -testcache
go test ./...

Tip

The master branch is WIP. Use the latest working build from the travis: travis-ci.org/jfixby/dcrregtest/builds

License

This code is licensed under the copyfree ISC License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateBlock

func GenerateBlock(h *coinharness.Harness, startHeight uint32) ([]*chainhash.Hash, error)

GenerateBlock is a helper function to ensure that the chain has actually incremented due to FORK blocks after stake voting height that may occur.

Types

type SimpleTestSetup

type SimpleTestSetup struct {

	// Mainnet creates a mainnet test harness
	Mainnet0 *coinharness.ChainWithMatureOutputsSpawner

	// Regnet25 creates a regnet test harness
	// with 25 mature outputs.
	Regnet25 *coinharness.ChainWithMatureOutputsSpawner

	// Simnet25 creates a simnet test harness
	// with 25 mature outputs.
	Simnet25 *coinharness.ChainWithMatureOutputsSpawner

	// Regnet5 creates a regnet test harness
	// with 5 mature outputs.
	Regnet5 *coinharness.ChainWithMatureOutputsSpawner

	// Regnet1 creates a regnet test harness
	// with 1 mature output.
	Regnet1 *coinharness.ChainWithMatureOutputsSpawner

	// Simnet1 creates a simnet test harness
	// with 1 mature output.
	Simnet1 *coinharness.ChainWithMatureOutputsSpawner

	// Regnet0 creates a regnet test harness
	// with only the genesis block.
	Regnet0 *coinharness.ChainWithMatureOutputsSpawner

	// Simnet0 creates a simnet test harness
	// with only the genesis block.
	Simnet0 *coinharness.ChainWithMatureOutputsSpawner

	// WorkingDir defines test setup working dir
	WorkingDir *pin.TempDirHandler
	// contains filtered or unexported fields
}

SimpleTestSetup harbours: - rpctest setup - csf-fork test setup - and bip0009 test setup

func Setup

func Setup() *SimpleTestSetup

Setup deploys this test setup

func (*SimpleTestSetup) TearDown

func (setup *SimpleTestSetup) TearDown()

TearDown all harnesses in test Pool. This includes removing all temporary directories, and shutting down any created processes.

Jump to

Keyboard shortcuts

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