Documentation ¶
Overview ¶
Package util - common functions used in end-to-end and integration testing. Allowing to start different types of Retrieval network nodes for testing.
Index ¶
- Constants
- func CallClientJsE2E(key string, walletKey string, registerAPI string, lotusAP string, ...) error
- func CallClientJsInstall() error
- func CreateNetwork(ctx context.Context) (*tc.Network, string)
- func GenerateAccount(lotusAP string, token string, superAcct string, num int) ([]string, []string, error)
- func GetCurrentBranch() string
- func GetEnvMap(envFile string) map[string]string
- func GetImageTag(repo, tag string) string
- func GetLotusToken() (string, string)
- func StartGateway(ctx context.Context, id string, tag string, network string, color string, ...) tc.Container
- func StartItest(ctx context.Context, tag string, network string, color string, ...) tc.Container
- func StartLotusDaemon(ctx context.Context, network string, verbose bool) tc.Container
- func StartLotusFullNode(ctx context.Context, network string, verbose bool) tc.Container
- func StartProvider(ctx context.Context, id string, tag string, network string, color string, ...) tc.Container
- func StartRedis(ctx context.Context, network string, verbose bool) tc.Container
- func StartRegister(ctx context.Context, tag string, network string, color string, ...) tc.Container
Constants ¶
const ColorBlue = "\033[34m"
const ColorBrightBlue = "\033[91m"
const ColorBrightCyan = "\033[91m"
const ColorBrightGreen = "\033[91m"
const ColorBrightPurple = "\033[91m"
const ColorBrightRed = "\033[91m"
const ColorBrightWhite = "\033[91m"
const ColorBrightYellow = "\033[91m"
const ColorCyan = "\033[36m"
const ColorGray = "\033[90m" // Used by lotus
const ColorGreen = "\033[32m"
const ColorPurple = "\033[35m"
const ColorRed = "\033[31m"
const ColorWhite = "\033[37m" // Used by redis
const ColorYellow = "\033[33m"
Variables ¶
This section is empty.
Functions ¶
func CallClientJsE2E ¶
func CallClientJsInstall ¶
func CallClientJsInstall() error
func CreateNetwork ¶
CreateNetwork creates a network
func GenerateAccount ¶
func GenerateAccount(lotusAP string, token string, superAcct string, num int) ([]string, []string, error)
GenerateAccount - helper method, used to generate a new filecoin account with 10 filecoins of balance
func GetCurrentBranch ¶
func GetCurrentBranch() string
GetCurrentBranch gets the current branch of this repo
func GetImageTag ¶
GetImageTag gets the image tag of a given repo and tag
func GetLotusToken ¶
GetLotusToken gets the lotus token and the super account from the lotus container
func StartGateway ¶
func StartGateway(ctx context.Context, id string, tag string, network string, color string, env map[string]string, verbose bool) tc.Container
StartGateway - start a gateway of specific id, tag, network, log color and env
func StartItest ¶
func StartItest(ctx context.Context, tag string, network string, color string, lotusToken string, superAcct string, done chan bool, verbose bool, reloadJsTests string) tc.Container
StartItest - start the itest, must only be called in host
func StartLotusDaemon ¶
StartLotusDaemon starts Lotus local development network, daemon only (miner is missing)
func StartLotusFullNode ¶
StartLotusFullNode starts Lotus local development network, two services: miner and daemon in one container
func StartProvider ¶
func StartProvider(ctx context.Context, id string, tag string, network string, color string, env map[string]string, verbose bool) tc.Container
StartProvider - start a provider of specific id, tag, network, log color and env
func StartRedis ¶
StartRedis - starts redis; used by register
Types ¶
This section is empty.