Documentation ¶
Index ¶
- Variables
- func DisableLog()
- func InitBackend(backendLog *logger.Backend, logFile, errLogFile string)
- func NetworkCliArgumentFromNetParams(params *dagconfig.Params) string
- func RunkobradForTesting(t *testing.T, testName string, rpcAddress string) func()
- func ScanFile(filePath string) <-chan []byte
- func ScanHexFile(filePath string) <-chan []byte
- func StartCmd(name string, args ...string) (*exec.Cmd, error)
- func TempDir(pattern string) (string, error)
- func UseLogger(backend *logger.Backend, level logger.Level)
- type LogWriter
Constants ¶
This section is empty.
Variables ¶
var DefaultAppDir = util.AppDir("stability-tests", false)
DefaultAppDir is the default app directory to be used by all tests
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.
func InitBackend ¶
InitBackend initializes the test log backend
func NetworkCliArgumentFromNetParams ¶
NetworkCliArgumentFromNetParams returns the kobrad command line argument that starts the given network.
func RunkobradForTesting ¶
RunkobradForTesting runs kobrad for testing purposes
func ScanFile ¶
ScanFile opens the file in the specified path, and returns a channel that sends the contents of the file line-by-line, ignoring lines beggining with //
func ScanHexFile ¶
ScanHexFile opens the file in the specified path, and returns a channel that sends the contents of the file line-by-line, ignoring lines beggining with //, parsing the hex data in all other lines
func StartCmd ¶
StartCmd runs a command as a separate process. The `name` parameter is used for logs. The command executable should be in args[0]
Types ¶
type LogWriter ¶
type LogWriter struct {
// contains filtered or unexported fields
}
LogWriter writes to the given log with the given log level and prefix
func NewLogWriter ¶
NewLogWriter returns a new LogWriter that forwards to `log` all data written to it using at `level` level