lite

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: Apache-2.0 Imports: 54 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLIVersionRequestHandler

func CLIVersionRequestHandler(w http.ResponseWriter, r *http.Request)

cli version REST handler endpoint

func CreateAddr

func CreateAddr(t *testing.T, name, password string, kb crkeys.Keybase) (sdk.AccAddress, string)

CreateAddr adds an address to the key store and returns an address and seed. It also requires that the key could be created.

func GetConfig

func GetConfig() *tmcfg.Config

GetConfig returns a Tendermint config for the test cases.

func GetKeyBase

func GetKeyBase(t *testing.T) crkeys.Keybase

GetKeyBase returns the LCD test keybase. It also requires that a directory could be made and a keybase could be fetched.

NOTE: memDB cannot be used because the request is expecting to interact with the default location.

func InitializeTestLCD

func InitializeTestLCD(
	t *testing.T, nValidators int, initAddrs []sdk.AccAddress,
) (cleanup func(), valConsPubKeys []crypto.PubKey, valOperAddrs []sdk.ValAddress, port string)

InitializeTestLCD starts Tendermint and the LCD in process, listening on their respective sockets where nValidators is the total number of validators and initAddrs are the accounts to initialize with some steak tokens. It returns a cleanup function, a set of validator public keys, and a port.

func NodeVersionRequestHandler

func NodeVersionRequestHandler(cliCtx context.CLIContext) http.HandlerFunc

connected node version REST handler endpoint

func Request

func Request(t *testing.T, port, method, path string, payload []byte) (*http.Response, string)

Request makes a test LCD test request. It returns a response object and a stringified response body.

func ServeLCDStartCommand

func ServeLCDStartCommand(cdc *codec.Codec) *cobra.Command

ServeLCDStartCommand will start irislcd node, which provides rest APIs with swagger-ui

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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