tmtest

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Overview

Package tmtest provides helpers for testing using tendermint server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunApp added in v0.21.3

func RunApp(ctx context.Context, t TestReporter, appName, home string) (cleanup func())

RunApp is like RunTendermint, just executes the application executable, assuming a prepared home directory

func RunTendermint

func RunTendermint(ctx context.Context, t TestReporter, home string) (cleanup func())

RunTendermint starts a tendermit process. Returned cleanup function will ensure the process has stopped and will block until.

Set FORCE_TM_TEST=1 environment variable to fail the test if the binary is not available. This might be desired when running tests by CI.

Set TM_DEBUG=1 environmental variable to output all tm logs

func SetupConfig added in v0.19.0

func SetupConfig(t assert.Tester, sourceDir string) (string, func())

SetupConfig creates a homedir to run inside, and copies demo tendermint files there.

these files reside in sourceDir and can be created via `tendermint init` (sourceDir can usually be "testdata")

second argument is cleanup call

Types

type TestReporter added in v0.19.0

type TestReporter interface {
	assert.Tester
	Skip(...interface{})
	Skipf(string, ...interface{})
	Logf(string, ...interface{})
}

TestReporter is the minimal subset of testing.TB needed to run these test helpers

Jump to

Keyboard shortcuts

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