testing

package
v0.0.0-...-bc2dafa Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BalanceCmd = &cobra.Command{
	Use:     "balance",
	Short:   "Running test cases",
	Long:    "Read the configuration run test case in config.json",
	Example: `./cmd balance ./comfig.json URL or ./cmd balance ./comfig.json http://localhost:8545`,
	Run:     GetBalance,
}
View Source
var DefaultFile = "./config.json"
View Source
var Generate = &cobra.Command{
	Use:     "generate",
	Short:   "generate private key and address",
	Long:    "This is the UNetwork used to generate the private key and address command to generate the private key to write to ./config.json",
	Example: `./cmd generate 10 or ./cmd generate n`,
	Run:     GenerateKey,
}
View Source
var GenerateTx = &cobra.Command{
	Use:     "generate_tx",
	Short:   "Generate transaction for testing TPS.",
	Long:    "This is the UNetwork generated transaction flag used to test the transaction processing system.",
	Example: `./cmd generate_tx toPrivateKey 10 URL or ./cmd generate_tx toPrivateKey count URL`,
	Run:     GenerateTransaction,
}
View Source
var TestCmd = &cobra.Command{
	Use:     "run",
	Short:   "Running test cases",
	Long:    "Read the configuration run test case in config.json",
	Example: `./cmd run fromPrivatekey path URL or ./cmd run b074ccb81649d52e3f7f813459f5e9a9db6c85bab523f6d8519c5c4397beaffe ./config.json http://localhost:8545`,
	Run:     Run,
}

Functions

func AddCmd

func AddCmd(cmd *cobra.Command)

func CreateKey

func CreateKey() string

func Execute

func Execute()

Execute executes the root command.

func ExecuteGetBalance

func ExecuteGetBalance(data *ToJson, flag uint32, wg *sync.WaitGroup)

func ExecuteTransaction

func ExecuteTransaction(data *ToJson, flag uint32)

func GenerateKey

func GenerateKey(cmd *cobra.Command, args []string)

func GenerateTransaction

func GenerateTransaction(cmd *cobra.Command, args []string)

func GetBalance

func GetBalance(cmd *cobra.Command, args []string)

func Run

func Run(cmd *cobra.Command, args []string)

Types

type ToJson

type ToJson struct {
	PrivKey string
	PubKey  string
	Address string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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