test

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package test implements helpers for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocateFreePorts

func AllocateFreePorts(n int) ([]int, error)

AllocateFreePorts finds n available ports Copied from https://github.com/tendermint/tendermint/issues/3682

func Cleanup added in v0.6.0

func Cleanup()

Cleanup removes all files and directories created by the test.

func NewEtcdListenUrls

func NewEtcdListenUrls() (string, string, error)

NewEtcdListenUrls returns two urls with different ports.

func NewSpace

func NewSpace() (tempDir string, deferFunc func(), err error)

NewSpace create a tmp dir and returns the path and its clear function. It will return any error when failed to create this dir.

func SetupModules added in v0.3.0

func SetupModules(flags []string, units ...run.Unit) func()

SetupModules wires input modules to build a testing ready runtime.

func Space

func Space(t *require.Assertions) (tempDir string, deferFunc func())

Space create a tmp dir and returns the path and its clear function. It will be panic when encountering some errors.

Types

This section is empty.

Directories

Path Synopsis
Package flags implements injected flags to run tests.
Package flags implements injected flags to run tests.
Package flow implements mockers for testing flow.
Package flow implements mockers for testing flow.
Package helpers implements several helpers for testing.
Package helpers implements several helpers for testing.
Package measure implements helpers to load schemas for testing.
Package measure implements helpers to load schemas for testing.
Package metric provides functions for collecting and analyzing metrics for stress testing.
Package metric provides functions for collecting and analyzing metrics for stress testing.
Package query provides functions for analyzing and collecting metrics.
Package query provides functions for analyzing and collecting metrics.
Package setup implements a real env in which to run tests.
Package setup implements a real env in which to run tests.
Package stream implements helpers to load schemas for testing.
Package stream implements helpers to load schemas for testing.

Jump to

Keyboard shortcuts

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