Documentation
¶
Overview ¶
Package commands provides CLI command wrappers for e2e testing. These are test utilities that invoke the CLI binary and verify outputs.
Index ¶
- Constants
- func AddEtnaChainValidatorToCluster(clusterName string, chainName string, nodeEndpoint string, ...) (string, error)
- func AddPermissionlessValidator(chainName string, nodeID string, stakeAmount string, stakingPeriod string) (string, error)
- func ApplyUpgradeLocal(chainName string) (string, error)
- func ApplyUpgradeToPublicNode(chainName, luxChainConfDir string) (string, error)
- func BlockchainStatus(blockchainName string) (string, error)
- func CleanNetwork()
- func CleanNetworkHard()
- func ConfigMetrics()
- func ConfigureBlockchain(blockchainName string, flags utils.TestFlags) (string, error)
- func ConfigureChainConfig(chainName string, genesisPath string)
- func ConfigurePerNodeChainConfig(chainName string, perNodeChainConfigPath string)
- func CreateBlockchain(blockchainName string, vmType string, version string) (string, error)
- func CreateCustomVMConfig(chainName string, genesisPath string, vmPath string)
- func CreateCustomVMConfigNonSOV(chainName string, genesisPath string, vmPath string)
- func CreateCustomVMConfigSOV(chainName string, genesisPath string, vmPath string)
- func CreateEVMConfig(chainName string, genesisPath string) (string, string)
- func CreateEVMConfigNonSOV(chainName string, genesisPath string, _ bool) (string, string)
- func CreateEVMConfigSOV(chainName string, genesisPath string) (string, string)
- func CreateEVMConfigWithVersion(chainName string, genesisPath string, version string)
- func CreateEVMConfigWithVersionNonSOV(chainName string, genesisPath string, version string, _ bool)
- func CreateEVMConfigWithVersionSOV(chainName string, genesisPath string, version string)
- func CreateEtnaEVMConfig(chainName string, ewoqEVMAddress string, ...) (string, string)
- func CreateKey(keyName string) (string, error)
- func CreateKeyForce(keyName string) (string, error)
- func CreateKeyFromPath(keyName string, keyPath string) (string, error)
- func CreateLocalEtnaNode(luxdVersion string, clusterName string, numNodes int) (string, error)
- func DeleteBlockchain(blockchainName string) error
- func DeleteChainConfig(chainName string)
- func DeleteE2ECluster()
- func DeleteE2EInventory()
- func DeleteElasticChainConfig(chainName string)
- func DeleteKey(keyName string) (string, error)
- func DeleteNode(hostName string)
- func DeployBlockchain(blockchainName string, flags utils.TestFlags) (string, error)
- func DeployChainLocally(chainName string) string
- func DeployChainLocallyExpectError(chainName string)
- func DeployChainLocallyExpectErrorNonSOV(chainName string)
- func DeployChainLocallyExpectErrorSOV(chainName string)
- func DeployChainLocallyNonSOV(chainName string) string
- func DeployChainLocallySOV(chainName string) string
- func DeployChainLocallyWithArgs(chainName string, version string, confPath string) string
- func DeployChainLocallyWithArgsAndOutput(chainName string, version string, confPath string) ([]byte, error)
- func DeployChainLocallyWithArgsAndOutputNonSOV(chainName string, version string, confPath string) ([]byte, error)
- func DeployChainLocallyWithArgsAndOutputSOV(chainName string, version string, confPath string) ([]byte, error)
- func DeployChainLocallyWithArgsExpectError(chainName string, version string, confPath string)
- func DeployChainLocallyWithVersion(chainName string, version string) string
- func DeployChainLocallyWithVersionNonSOV(chainName string, version string) string
- func DeployChainLocallyWithVersionSOV(chainName string, version string) string
- func DeployChainLocallyWithViperConf(chainName string, confPath string) string
- func DeployChainLocallyWithViperConfNonSOV(chainName string, confPath string) string
- func DeployChainLocallyWithViperConfSOV(chainName string, confPath string) string
- func DeployERC20Contract(network, key, symbol, supply, receiver, blockchain string) string
- func DeployEtnaBlockchain(chainName string, clusterName string, bootstrapEndpoints []string, ...) (string, error)
- func DeployInterchainTokenTransferrer(args []string) string
- func DeployRelayer(args []string, testFlags utils.TestFlags) (string, error)
- func DeployWarpContracts(args []string, testFlags utils.TestFlags) (string, error)
- func DescribeChain(chainName string) (string, error)
- func DestroyLocalNode(clusterName string) (string, error)
- func ExportKey(keyName string) (string, error)
- func ExportKeyToFile(keyName string, outputPath string) (string, error)
- func GetLatestLuxdVersionFromGithub() string
- func GetLocalClusterStatus(clusterName string, blockchainName string) (string, error)
- func GetNetworkStatus() (string, error)
- func GetVersion() string
- func ImportChainConfig(repoAlias string, chainName string)
- func ImportChainConfigFromURL(repoURL string, branch string, chainName string)
- func ImportUpgradeBytes(chainName, filepath string) (string, error)
- func InitValidatorManager(chainName string, clusterName string, endpoint string, blockchainID string) (string, error)
- func KeyTransferSend(args []string) (string, error)
- func ListKeys(network string, allBalances bool, chains string, tokens string) (string, error)
- func ListValidators(chainName string, network string) (string, error)
- func NodeCreate(network, version string, numNodes int, separateMonitoring bool, ...) string
- func NodeDevnet(version string, numNodes int, numAPINodes int) string
- func NodeExport(filename string, withSecrets bool) string
- func NodeImport(filename string, clusterName string) string
- func NodeList() string
- func NodeSSH(name, command string) string
- func NodeStatus() string
- func NodeUpgrade() string
- func NodeWhitelistSSH(sshPubKey string) string
- func RemoveEtnaChainValidatorFromCluster(clusterName string, chainName string, nodeEndpoint string, keyName string, ...) (string, error)
- func RemoveValidator(chainName string, nodeID string) (string, error)
- func SendWarpMessage(args []string, testFlags utils.TestFlags) (string, error)
- func SimulateGetChainStatsTestnet(chainName, chainID string) string
- func SimulateMainnetAddValidator(chainName string, nodeID string, start string, period string, weight string) string
- func SimulateMainnetDeploy(chainName string) string
- func SimulateMainnetDeployNonSOV(chainName string, chainID int, skipPrompt bool) string
- func SimulateMainnetDeploySOV(chainName string, chainID int, skipPrompt bool) string
- func SimulateMainnetJoin(chainName string, nodeConfig string, pluginDir string, nodeID string) string
- func SimulateMultisigMainnetDeployNonSOV(chainName string, controlKeys []string, chainAuthKeys []string, txPath string, ...) string
- func SimulateMultisigMainnetDeploySOV(chainName string, controlKeys []string, chainAuthKeys []string, txPath string, ...) string
- func SimulateTestnetAddValidator(chainName string, key string, nodeID string, start string, period string, ...) string
- func SimulateTestnetDeploy(chainName string, key string, controlKeys string) string
- func SimulateTestnetDeployNonSOV(chainName string, key string, controlKeys string) string
- func SimulateTestnetDeploySOV(chainName string, key string, controlKeys string) string
- func SimulateTestnetJoin(chainName string, nodeConfig string, pluginDir string, nodeID string) string
- func SimulateTestnetRemoveValidator(chainName string, key string, nodeID string) string
- func SimulateTestnetTransformChain(chainName string, key string) (string, error)
- func StartNetwork() string
- func StartNetworkWithVersion(version string) string
- func StopNetwork(args ...string) error
- func StopRelayer() (string, error)
- func TrackLocalEtnaChain(clusterName string, chainName string) (string, error)
- func TransactionCommit(chainName string, txPath string, expectError bool) string
- func TransactionSignWithLedger(chainName string, txPath string, expectError bool) string
- func TransformElasticChainLocally(chainName string) (string, error)
- func TransformElasticChainLocallyandTransformValidators(chainName string, stakeAmount string) (string, error)
- func UpgradeCustomVM(chainName string, binaryPath string) (string, error)
- func UpgradeCustomVMLocal(chainName string, binaryPath string) string
- func UpgradeVMConfig(chainName string, targetVersion string) (string, error)
- func UpgradeVMLocal(chainName string, targetVersion string) string
- func UpgradeVMPublic(chainName string, targetVersion string, pluginDir string) (string, error)
- type ChainManagementType
- type PrometheusConfig
- type ScrapeConfig
- type StaticConfig
Constants ¶
const ( CLIBinary = "./bin/lux" ChainCmd = "chain" NetworkCmd = "network" KeyCmd = "key" UpgradeCmd = "upgrade" ElasticTransformCmd = "elastic" JoinCmd = "join" RemoveValidatorCmd = "removeValidator" )
const ( PoSString = "proof-of-stake" PoAString = "proof-of-authority" )
const ( ExpectFail = false ExpectSuccess = true )
const (
ContractCMD = "contract"
)
const (
InterchainCMD = "interchain"
)
const (
WarpCmd = "warp"
)
Variables ¶
This section is empty.
Functions ¶
func AddEtnaChainValidatorToCluster ¶ added in v1.22.9
func ApplyUpgradeToPublicNode ¶
#nosec G204
func BlockchainStatus ¶ added in v1.9.5
BlockchainStatus gets the status of a blockchain
func ConfigMetrics ¶
func ConfigMetrics()
func ConfigureBlockchain ¶ added in v1.9.5
ConfigureBlockchain configures a blockchain with the given flags
func ConfigureChainConfig ¶
func CreateBlockchain ¶ added in v1.9.5
CreateBlockchain creates a blockchain with the given VM type and version
func CreateCustomVMConfig ¶
#nosec G204
func CreateCustomVMConfigNonSOV ¶ added in v1.9.5
CreateCustomVMConfigNonSOV creates a non-sovereign custom VM config
#nosec G204
func CreateCustomVMConfigSOV ¶ added in v1.9.5
CreateCustomVMConfigSOV creates a sovereign custom VM config
#nosec G204
func CreateEVMConfig ¶ added in v1.21.40
#nosec G204
func CreateEVMConfigNonSOV ¶ added in v1.21.40
CreateEVMConfigNonSOV creates a non-sovereign chain EVM config
#nosec G204
func CreateEVMConfigSOV ¶ added in v1.21.40
CreateEVMConfigSOV creates a sovereign chain EVM config
#nosec G204
func CreateEVMConfigWithVersion ¶ added in v1.21.40
#nosec G204
func CreateEVMConfigWithVersionNonSOV ¶ added in v1.21.40
CreateEVMConfigWithVersionNonSOV creates a non-sovereign chain EVM config with specific version
#nosec G204
func CreateEVMConfigWithVersionSOV ¶ added in v1.21.40
CreateEVMConfigWithVersionSOV creates a sovereign chain EVM config with specific version
#nosec G204
func CreateEtnaEVMConfig ¶ added in v1.21.40
func CreateEtnaEVMConfig( chainName string, ewoqEVMAddress string, chainManagementType ChainManagementType, ) (string, string)
func CreateKeyFromPath ¶
#nosec G204
func CreateLocalEtnaNode ¶
func DeleteBlockchain ¶ added in v1.9.5
DeleteBlockchain deletes a blockchain
func DeleteChainConfig ¶ added in v1.22.9
func DeleteChainConfig(chainName string)
func DeleteE2ECluster ¶ added in v1.9.5
func DeleteE2ECluster()
DeleteE2ECluster deletes the E2E test cluster
#nosec G204
func DeleteE2EInventory ¶ added in v1.9.5
func DeleteE2EInventory()
DeleteE2EInventory deletes the E2E test inventory
#nosec G204
func DeleteElasticChainConfig ¶ added in v1.21.41
func DeleteElasticChainConfig(chainName string)
func DeleteNode ¶ added in v1.9.5
func DeleteNode(hostName string)
DeleteNode deletes a node
#nosec G204
func DeployBlockchain ¶ added in v1.9.5
DeployBlockchain deploys a blockchain with the given flags
func DeployChainLocallyExpectError ¶ added in v1.22.9
func DeployChainLocallyExpectError(chainName string)
#nosec G204
func DeployChainLocallyExpectErrorNonSOV ¶ added in v1.22.9
func DeployChainLocallyExpectErrorNonSOV(chainName string)
DeployChainLocallyExpectErrorNonSOV deploys a non-sovereign chain locally expecting an error
#nosec G204
func DeployChainLocallyExpectErrorSOV ¶ added in v1.22.9
func DeployChainLocallyExpectErrorSOV(chainName string)
DeployChainLocallyExpectErrorSOV deploys a sovereign chain locally expecting an error
#nosec G204
func DeployChainLocallyNonSOV ¶ added in v1.22.9
DeployChainLocallyNonSOV deploys a non-sovereign chain locally
#nosec G204
func DeployChainLocallySOV ¶ added in v1.22.9
DeployChainLocallySOV deploys a sovereign chain locally
#nosec G204
func DeployChainLocallyWithArgsAndOutput ¶ added in v1.22.9
func DeployChainLocallyWithArgsAndOutputNonSOV ¶ added in v1.22.9
func DeployChainLocallyWithArgsAndOutputNonSOV(chainName string, version string, confPath string) ([]byte, error)
DeployChainLocallyWithArgsAndOutputNonSOV deploys a non-sovereign chain locally and returns output
#nosec G204
func DeployChainLocallyWithArgsAndOutputSOV ¶ added in v1.22.9
func DeployChainLocallyWithArgsAndOutputSOV(chainName string, version string, confPath string) ([]byte, error)
DeployChainLocallyWithArgsAndOutputSOV deploys a sovereign chain locally and returns output
#nosec G204
func DeployChainLocallyWithArgsExpectError ¶ added in v1.22.9
func DeployChainLocallyWithVersionNonSOV ¶ added in v1.22.9
DeployChainLocallyWithVersionNonSOV deploys a non-sovereign chain locally with specific version
#nosec G204
func DeployChainLocallyWithVersionSOV ¶ added in v1.22.9
DeployChainLocallyWithVersionSOV deploys a sovereign chain locally with specific version
#nosec G204
func DeployChainLocallyWithViperConfNonSOV ¶ added in v1.22.9
DeployChainLocallyWithViperConfNonSOV deploys a non-sovereign chain locally with viper config
#nosec G204
func DeployChainLocallyWithViperConfSOV ¶ added in v1.22.9
DeployChainLocallyWithViperConfSOV deploys a sovereign chain locally with viper config
#nosec G204
func DeployERC20Contract ¶
#nosec G204
func DeployEtnaBlockchain ¶
func DeployInterchainTokenTransferrer ¶
#nosec G204
func DeployRelayer ¶
#nosec G204
func DeployWarpContracts ¶
#nosec G204
func DescribeChain ¶ added in v1.22.9
#nosec G204
func DestroyLocalNode ¶
func ExportKeyToFile ¶
#nosec G204
func GetLatestLuxdVersionFromGithub ¶
func GetLatestLuxdVersionFromGithub() string
func GetLocalClusterStatus ¶
func GetVersion ¶
func GetVersion() string
func ImportChainConfig ¶ added in v1.22.9
#nosec G204
func ImportChainConfigFromURL ¶ added in v1.22.9
#nosec G204
func ImportUpgradeBytes ¶
#nosec G204
func InitValidatorManager ¶
func KeyTransferSend ¶ added in v1.9.5
#nosec G204
func ListValidators ¶
#nosec G204
func NodeCreate ¶
func NodeExport ¶
func NodeImport ¶
func NodeStatus ¶
func NodeStatus() string
func NodeUpgrade ¶
func NodeUpgrade() string
func NodeWhitelistSSH ¶
func RemoveEtnaChainValidatorFromCluster ¶ added in v1.22.9
func SendWarpMessage ¶
#nosec G204
func SimulateGetChainStatsTestnet ¶ added in v1.22.9
#nosec G204
func SimulateMainnetAddValidator ¶
func SimulateMainnetAddValidator( chainName string, nodeID string, start string, period string, weight string, ) string
simulates mainnet add validator execution path on a local network
#nosec G204
func SimulateMainnetDeployNonSOV ¶ added in v1.9.5
SimulateMainnetDeployNonSOV simulates non-sovereign chain deployment on mainnet Updated to accept chainID and skipPrompt parameters to match usage
#nosec G204
func SimulateMainnetDeploySOV ¶ added in v1.9.5
SimulateMainnetDeploySOV simulates sovereign chain deployment on mainnet
#nosec G204
func SimulateMainnetJoin ¶
func SimulateMainnetJoin( chainName string, nodeConfig string, pluginDir string, nodeID string, ) string
simulates mainnet join execution path on a local network
#nosec G204
func SimulateMultisigMainnetDeployNonSOV ¶ added in v1.9.5
func SimulateMultisigMainnetDeployNonSOV( chainName string, controlKeys []string, chainAuthKeys []string, txPath string, expectError bool, ) string
SimulateMultisigMainnetDeployNonSOV simulates multisig non-sovereign chain deployment on mainnet
#nosec G204
func SimulateMultisigMainnetDeploySOV ¶ added in v1.9.5
func SimulateMultisigMainnetDeploySOV( chainName string, controlKeys []string, chainAuthKeys []string, txPath string, expectError bool, ) string
SimulateMultisigMainnetDeploySOV simulates multisig sovereign chain deployment on mainnet
#nosec G204
func SimulateTestnetAddValidator ¶
func SimulateTestnetAddValidator( chainName string, key string, nodeID string, start string, period string, weight string, ) string
simulates testnet add validator execution path on a local network
#nosec G204
func SimulateTestnetDeployNonSOV ¶ added in v1.9.5
SimulateTestnetDeployNonSOV simulates non-sovereign chain deployment on testnet
#nosec G204
func SimulateTestnetDeploySOV ¶ added in v1.9.5
SimulateTestnetDeploySOV simulates sovereign chain deployment on testnet
#nosec G204
func SimulateTestnetJoin ¶
func SimulateTestnetJoin( chainName string, nodeConfig string, pluginDir string, nodeID string, ) string
simulates testnet join execution path on a local network
#nosec G204
func SimulateTestnetRemoveValidator ¶
simulates testnet add validator execution path on a local network
func SimulateTestnetTransformChain ¶ added in v1.22.9
func TrackLocalEtnaChain ¶ added in v1.22.9
func TransactionCommit ¶ added in v1.9.5
TransactionCommit commits a transaction from a file
#nosec G204
func TransactionSignWithLedger ¶ added in v1.9.5
TransactionSignWithLedger signs a transaction with a ledger
#nosec G204
func TransformElasticChainLocally ¶ added in v1.21.41
func TransformElasticChainLocallyandTransformValidators ¶ added in v1.21.41
func UpgradeCustomVM ¶
#nosec G204
func UpgradeCustomVMLocal ¶
#nosec G204
func UpgradeVMConfig ¶
#nosec G204
func UpgradeVMLocal ¶
#nosec G204
Types ¶
type ChainManagementType ¶ added in v1.22.9
type ChainManagementType uint
const ( Unknown ChainManagementType = iota PoA PoS )
type PrometheusConfig ¶
type PrometheusConfig struct {
ScrapeConfigs []ScrapeConfig `yaml:"scrape_configs"`
}
func ParsePrometheusYamlConfig ¶
func ParsePrometheusYamlConfig(filePath string) PrometheusConfig
ParsePrometheusYamlConfig parses prometheus config YAML file installed in separate monitoring host in /etc/prometheus/prometheus.yml
type ScrapeConfig ¶
type ScrapeConfig struct {
JobName string `yaml:"job_name"`
StaticConfigs []StaticConfig `yaml:"static_configs"`
}
type StaticConfig ¶
type StaticConfig struct {
Targets []string `yaml:"targets"`
}