Documentation ¶
Index ¶
- func BuildBridges(h *Holochain, port string, bridgeApps []BridgeAppForTests) (bridgeAppServers []*ui.WebServer, err error)
- func DoTest(h *Holochain, name string, i int, fixtures TestFixtures, t TestData, ...) (err error)
- func DoTests(h *Holochain, name string, testSet TestSet, minTime time.Duration, ...) (errs []error)
- func StartBench(h *Holochain) *benchmark
- func StartBridgeApp(h *Holochain, port string) (bridgeAppServer *ui.WebServer, err error)
- func StopBridgeApps(bridgeAppServers []*ui.WebServer)
- func Test(h *Holochain, bridgeApps []BridgeAppForTests, forceBenchmark bool) []error
- func TestOne(h *Holochain, one string, bridgeApps []BridgeAppForTests, forceBenchmark bool) []error
- func TestScenario(h *Holochain, scenario string, role string, replacementPairs map[string]string, ...) (err error, testErrs []error)
- type BridgeAppForTests
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 StopBridgeApps ¶
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)
Types ¶
type BridgeAppForTests ¶
type BridgeAppForTests struct { H *Holochain BridgeApp BridgeApp }