util

package
v0.0.0-...-b982a48 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

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

View Source
const ColorBlue = "\033[34m"
View Source
const ColorBrightBlue = "\033[91m"
View Source
const ColorBrightCyan = "\033[91m"
View Source
const ColorBrightGreen = "\033[91m"
View Source
const ColorBrightPurple = "\033[91m"
View Source
const ColorBrightRed = "\033[91m"
View Source
const ColorBrightWhite = "\033[91m"
View Source
const ColorBrightYellow = "\033[91m"
View Source
const ColorCyan = "\033[36m"
View Source
const ColorGray = "\033[90m" // Used by lotus
View Source
const ColorGreen = "\033[32m"
View Source
const ColorPurple = "\033[35m"
View Source
const ColorRed = "\033[31m"
View Source
const ColorWhite = "\033[37m" // Used by redis
View Source
const ColorYellow = "\033[33m"

Variables

This section is empty.

Functions

func CallClientJsE2E

func CallClientJsE2E(key string, walletKey string, registerAPI string, lotusAP string, lotusToken string) error

func CallClientJsInstall

func CallClientJsInstall() error

func CreateNetwork

func CreateNetwork(ctx context.Context) (*tc.Network, string)

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 GetEnvMap

func GetEnvMap(envFile string) map[string]string

GetEnvMap gets the env map from a given env file

func GetImageTag

func GetImageTag(repo, tag string) string

GetImageTag gets the image tag of a given repo and tag

func GetLotusToken

func GetLotusToken() (string, string)

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

func StartLotusDaemon(ctx context.Context, network string, verbose bool) tc.Container

StartLotusDaemon starts Lotus local development network, daemon only (miner is missing)

func StartLotusFullNode

func StartLotusFullNode(ctx context.Context, network string, verbose bool) tc.Container

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

func StartRedis(ctx context.Context, network string, verbose bool) tc.Container

StartRedis - starts redis; used by register

func StartRegister

func StartRegister(ctx context.Context, tag string, network string, color string, env map[string]string, verbose bool) tc.Container

StartRegister - starts the register

Types

This section is empty.

Jump to

Keyboard shortcuts

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