apptest

package
v0.1.0-alpha-26 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: GPL-3.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBridges

func BuildBridges(h *Holochain, port string, bridgeApps []BridgeAppForTests) (bridgeAppServers []*ui.WebServer, err error)

BuildBridges starts up the bridged apps and builds bridges to/from them for Holochain h

func DoTest

func DoTest(h *Holochain, name string, i int, fixtures TestFixtures, t TestData, startTime time.Time, history *history, replacementPairs map[string]string, benchmarks map[string]*benchmark, benchmarkAllTests bool) (err error)

DoTest runs a singe test.

func DoTests

func DoTests(h *Holochain, name string, testSet TestSet, minTime time.Duration, replacementPairs map[string]string) (errs []error)

DoTests runs through all the tests in a TestSet and returns any errors encountered TODO: this code can cause crazy race conditions because lastResults and lastMatches get passed into go routines that run asynchronously. We should probably reimplement this with channels or some other thread-safe queues.

func StartBench

func StartBench(h *Holochain) *benchmark

StartBench returns a benchmark data struct set up so that a subsequent call to EndBench can then complete and set the values

func StartBridgeApp

func StartBridgeApp(h *Holochain, port string) (bridgeAppServer *ui.WebServer, err error)

func StopBridgeApps

func StopBridgeApps(bridgeAppServers []*ui.WebServer)

func Test

func Test(h *Holochain, bridgeApps []BridgeAppForTests, forceBenchmark bool) []error

Test loops through each of the test files in path calling the functions specified This function is useful only in the context of developing a holochain and will return an error if the chain has already been started (i.e. has genesis entries)

func TestOne

func TestOne(h *Holochain, one string, bridgeApps []BridgeAppForTests, forceBenchmark bool) []error

TestOne tests a single test file This function is useful only in the context of developing a holochain and will return an error if the chain has already been started (i.e. has genesis entries)

func TestScenario

func TestScenario(h *Holochain, scenario string, role string, replacementPairs map[string]string, benchmarks bool, bridgeApps []BridgeApp) (err error, testErrs []error)

TestScenario runs the tests of a single role in a scenario

Types

type BridgeAppForTests

type BridgeAppForTests struct {
	H         *Holochain
	BridgeApp BridgeApp
}

Jump to

Keyboard shortcuts

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