node

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: MIT Imports: 40 Imported by: 0

Documentation

Overview

Copyright (C) 2025, Dione Limited. All rights reserved. See the file LICENSE for licensing terms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRoles

func CheckRoles(roles []SupportedRole) error

CheckRoles checks if the combination of roles is valid

func GenerateStakingFiles

func GenerateStakingFiles(keyPath string) (ids.NodeID, error)

GenerateStakingFiles generates the following files: staker.crt, staker.key and signer.key and stores them in the provided directory in argument in local machine

func GetPublicKeyFromSSHKey

func GetPublicKeyFromSSHKey(keyPath string) (string, error)

GetPublicKeyFromDefaultSSHKey returns the public key from the default SSH key

func NewNodeConnection

func NewNodeConnection(h *Node, port uint) (*goph.Client, error)

NewNodeConnection creates a new SSH connection to the node

Types

type MockLogger

type MockLogger struct{}

MockLogger is a mock implementation of odyssey.LeveledLogger for testing

func (*MockLogger) Debugf

func (m *MockLogger) Debugf(format string, args ...interface{})

func (*MockLogger) Errorf

func (m *MockLogger) Errorf(format string, args ...interface{})

func (*MockLogger) Infof

func (m *MockLogger) Infof(format string, args ...interface{})

func (*MockLogger) Warnf

func (m *MockLogger) Warnf(format string, args ...interface{})

type Node

type Node struct {
	// NodeID is Odyssey Node ID of the node
	NodeID string

	// IP address of the node
	IP string

	// SSH configuration for the node
	SSHConfig SSHConfig

	// Roles of the node
	// Full list of node roles:
	// - Validator
	// - API
	// - AWM Relayer
	// - Load Test
	// - Monitoring
	Roles []SupportedRole

	// Logger for node
	Logger odyssey.LeveledLogger

	// BLS provides a way to aggregate signatures off chain into a single signature that can be efficiently verified on chain.
	// For more information about how BLS is used on the O-Chain, please head to https://docs.dione.network/cross-chain/odyssey-warp-messaging/deep-dive#bls-multi-signatures-with-public-key-aggregation
	BlsSecretKey *bls.SecretKey
	// contains filtered or unexported fields
}

Node is an output of CreateNodes

func CreateNodes

func CreateNodes(
	ctx context.Context,
	nodeParams *NodeParams,
) ([]Node, error)

CreateNodes is a placeholder function for node creation. Cloud functionality has been removed from this SDK. This function now returns an error indicating that cloud functionality is not available.

func (*Node) BuildDockerImage

func (h *Node) BuildDockerImage(image string, path string, dockerfile string) error

BuildDockerImage builds a docker image on a remote node.

func (*Node) BuildDockerImageFromGitRepo

func (h *Node) BuildDockerImageFromGitRepo(image string, gitRepo string, commit string) error

BuildDockerImageFromGitRepo builds a docker image from a git repo on a remote node.

func (*Node) Cmd

func (h *Node) Cmd(ctx context.Context, name string, script string) (*goph.Cmd, error)

Cmd returns a new command to be executed on the remote node.

func (*Node) Command

func (h *Node) Command(env []string, timeout time.Duration, script string) ([]byte, error)

Command executes a shell command on a remote node.

func (*Node) Commandf

func (h *Node) Commandf(env []string, timeout time.Duration, format string, args ...interface{}) ([]byte, error)

Commandf is a shorthand for Command with a formatted script.

func (*Node) ComposeOverSSH

func (h *Node) ComposeOverSSH(
	composeDesc string,
	timeout time.Duration,
	composePath string,
	composeVars dockerComposeInputs,
) error

ComposeOverSSH sets up a docker-compose file on a remote node over SSH.

func (*Node) ComposeSSHSetupLoadTest

func (h *Node) ComposeSSHSetupLoadTest() error

func (*Node) ComposeSSHSetupMonitoring

func (h *Node) ComposeSSHSetupMonitoring() error

ComposeSSHSetupMonitoring sets up monitoring using docker-compose.

func (*Node) ComposeSSHSetupNode

func (h *Node) ComposeSSHSetupNode(networkID string, subnetsToTrack []string, odysseyGoVersion string, withMonitoring bool) error

ComposeSSHSetupNode sets up an OdysseyGo node and dependencies on a remote node over SSH.

func (*Node) Connect

func (h *Node) Connect(port uint) error

Connect starts a new SSH connection with the provided private key.

func (*Node) Connected

func (h *Node) Connected() bool

func (*Node) CreateTempDir

func (h *Node) CreateTempDir() (string, error)

CreateTempDir creates a temporary directory on the remote server.

func (*Node) CreateTempFile

func (h *Node) CreateTempFile() (string, error)

CreateTemp creates a temporary file on the remote server.

func (*Node) Destroy

func (h *Node) Destroy(ctx context.Context) error

Destroy destroys a node. Cloud functionality has been removed from this SDK.

func (*Node) Disconnect

func (h *Node) Disconnect() error

func (*Node) DockerLocalImageExists

func (h *Node) DockerLocalImageExists(image string) (bool, error)

DockerLocalImageExists checks if a docker image exists on a remote node.

func (*Node) Download

func (h *Node) Download(remoteFile string, localFile string, timeout time.Duration) error

Download downloads a file from the remote server to the local machine.

func (*Node) ExpandHome

func (h *Node) ExpandHome(path string) string

ExpandHome expands the ~ symbol to the home directory.

func (*Node) FileExists

func (h *Node) FileExists(path string) (bool, error)

FileExists checks if a file exists on the remote server.

func (*Node) Forward

func (h *Node) Forward(httpRequest string, timeout time.Duration) ([]byte, error)

Forward forwards the TCP connection to a remote address.

func (*Node) GetBLSKeyFromRemoteHost

func (h *Node) GetBLSKeyFromRemoteHost() error

GetBLSKeyFromRemoteHost gets BLS information from remote host and sets the BlsSecretKey value in Node object

func (*Node) GetConnection

func (h *Node) GetConnection() *goph.Client

GetConnection returns the SSH connection client for the Node. Returns a pointer to a goph.Client.

func (*Node) GetDockerImageVersion

func (h *Node) GetDockerImageVersion(image string, timeout time.Duration) (string, error)

func (*Node) GetOdysseyGoConfigData

func (h *Node) GetOdysseyGoConfigData() (map[string]interface{}, error)

func (*Node) GetOdysseyGoHealth

func (h *Node) GetOdysseyGoHealth() (bool, error)

func (*Node) GetOdysseyGoNetworkName

func (h *Node) GetOdysseyGoNetworkName() (string, error)

func (*Node) GetOdysseyGoVersion

func (h *Node) GetOdysseyGoVersion() (string, error)

func (*Node) GetRemoteComposeContent

func (h *Node) GetRemoteComposeContent(composeFile string, timeout time.Duration) (string, error)

GetRemoteComposeContent gets the content of a remote docker-compose file.

func (*Node) GetSSHClient

func (h *Node) GetSSHClient() *ssh.Client

GetSSHClient returns the SSH client for the Node. Returns a pointer to an ssh.Client.

func (*Node) HasRemoteComposeService

func (h *Node) HasRemoteComposeService(composeFile string, service string, timeout time.Duration) (bool, error)

HasRemoteComposeService checks if a serviceis present in a remote docker-compose file.

func (*Node) HasSystemDAvailable

func (h *Node) HasSystemDAvailable() bool

HasSystemDAvailable checks if systemd is available on a remote host.

func (*Node) InitDockerComposeService

func (h *Node) InitDockerComposeService(composeFile string, service string, timeout time.Duration) error

func (*Node) ListDockerComposeImages

func (h *Node) ListDockerComposeImages(composeFile string, timeout time.Duration) (map[string]string, error)

func (*Node) ListRemoteComposeServices

func (h *Node) ListRemoteComposeServices(composeFile string, timeout time.Duration) ([]string, error)

ListRemoteComposeServices lists the services in a remote docker-compose file.

func (*Node) MergeComposeFiles

func (h *Node) MergeComposeFiles(currentComposeFile string, newComposeFile string) error

mergeComposeFiles merges two docker-compose files on a remote node.

func (*Node) MkdirAll

func (h *Node) MkdirAll(remoteDir string, timeout time.Duration) error

MkdirAll creates a folder on the remote server.

func (*Node) MonitorNodes

func (h *Node) MonitorNodes(ctx context.Context, targets []Node, chainID string) error

MonitorNodes links all the nodes specified with the monitoring node so that the monitoring host can start tracking the validator nodes metrics and collecting their logs Cloud functionality has been removed from this SDK.

func (*Node) OdysseygoRPCClient

func (h *Node) OdysseygoRPCClient() (*rpc.Client, error)

OdysseygoRPCClient returns the RPC client to the node.

func (*Node) OdysseygoTCPClient

func (h *Node) OdysseygoTCPClient() (*net.Conn, error)

OdysseygoTCPClient returns the connection to the node.

func (*Node) ParseRemoteComposeContent

func (h *Node) ParseRemoteComposeContent(composeFile string, pattern string, timeout time.Duration) (string, error)

ParseRemoteComposeContent extracts a value from a remote docker-compose file.

func (*Node) Post

func (h *Node) Post(path string, requestBody string) ([]byte, error)

Post sends a POST request to the node at the specified path with the provided body.

func (*Node) PrepareDockerImageWithRepo

func (h *Node) PrepareDockerImageWithRepo(image string, gitRepo string, commit string) error

PrepareDockerImageWithRepo prepares a docker image on a remote node.

func (*Node) ProvideStakingFiles

func (h *Node) ProvideStakingFiles(keyPath string) error

ProvideStakingFiles generates the files needed to validate the primary network:

and stores them in the provided directory in argument in local machine and subsequently uploads these files into the remote host in /home/ubuntu/.odysseygo/staking/ directory

func (*Node) PullDockerImage

func (h *Node) PullDockerImage(image string) error

PullDockerImage pulls a docker image on a remote node.

func (*Node) PushComposeFile

func (h *Node) PushComposeFile(localFile string, remoteFile string, merge bool) error

func (*Node) ReadFileBytes

func (h *Node) ReadFileBytes(remoteFile string, timeout time.Duration) ([]byte, error)

ReadFileBytes downloads a file from the remote server to a byte array

func (*Node) Remove

func (h *Node) Remove(path string, recursive bool) error

Remove removes a file on the remote server.

func (*Node) RestartDockerCompose

func (h *Node) RestartDockerCompose(timeout time.Duration) error

func (*Node) RestartDockerComposeService

func (h *Node) RestartDockerComposeService(composeFile string, service string, timeout time.Duration) error

func (*Node) RunOverSSH

func (h *Node) RunOverSSH(
	scriptDesc string,
	timeout time.Duration,
	scriptPath string,
	templateVars scriptInputs,
) error

RunOverSSH runs provided script path over ssh. This script can be template as it will be rendered using scriptInputs vars

func (*Node) RunSSHCopyMonitoringDashboards

func (h *Node) RunSSHCopyMonitoringDashboards(monitoringDashboardPath string) error

func (*Node) RunSSHGetNewSubnetEVMRelease

func (h *Node) RunSSHGetNewSubnetEVMRelease(subnetEVMReleaseURL, subnetEVMArchive string) error

RunSSHGetNewSubnetEVMRelease runs script to download new subnet evm

func (*Node) RunSSHRenderOdysseyNodeConfig

func (h *Node) RunSSHRenderOdysseyNodeConfig(networkID string, trackSubnets []string) error

PrepareOdysseygoConfig creates the config files for the OdysseyGo networkID is the ID of the network to be used trackSubnets is the list of subnets to track

func (*Node) RunSSHRestartOdysseygo

func (h *Node) RunSSHRestartOdysseygo() error

RunSSHRestartOdysseygo runs script to restart odysseygo

func (*Node) RunSSHSetupDockerService

func (h *Node) RunSSHSetupDockerService() error

RunSSHSetupDockerService runs script to setup docker compose service for CLI

func (*Node) RunSSHSetupLokiConfig

func (h *Node) RunSSHSetupLokiConfig(port int) error

func (*Node) RunSSHSetupMonitoringFolders

func (h *Node) RunSSHSetupMonitoringFolders() error

RunSSHSetupMonitoringFolders sets up monitoring folders

func (*Node) RunSSHSetupNode

func (h *Node) RunSSHSetupNode() error

RunSSHSetupNode runs script to setup sdk dependencies on a remote host over SSH.

func (*Node) RunSSHSetupPrometheusConfig

func (h *Node) RunSSHSetupPrometheusConfig(odysseyGoPorts, machinePorts, loadTestPorts []string) error

func (*Node) RunSSHSetupPromtailConfig

func (h *Node) RunSSHSetupPromtailConfig(lokiIP string, lokiPort int, nodeID string, chainID string) error

func (*Node) RunSSHStartOdysseygo

func (h *Node) RunSSHStartOdysseygo() error

RunSSHStartOdysseygo runs script to start odysseygo

func (*Node) RunSSHStopOdysseygo

func (h *Node) RunSSHStopOdysseygo() error

RunSSHStopOdysseygo runs script to stop odysseygo

func (*Node) RunSSHUpgradeOdysseygo

func (h *Node) RunSSHUpgradeOdysseygo(odysseyGoVersion string) error

RunSSHUpgradeOdysseygo runs script to upgrade odysseygo

func (*Node) RunSSHUpgradeSubnetEVM

func (h *Node) RunSSHUpgradeSubnetEVM(subnetEVMBinaryPath string) error

RunSSHUpgradeSubnetEVM runs script to upgrade subnet evm

func (*Node) RunSSHUploadStakingFiles

func (h *Node) RunSSHUploadStakingFiles(keyPath string) error

RunSSHUploadStakingFiles uploads staking files to a remote host via SSH.

func (*Node) StartDockerCompose

func (h *Node) StartDockerCompose(timeout time.Duration) error

func (*Node) StartDockerComposeService

func (h *Node) StartDockerComposeService(composeFile string, service string, timeout time.Duration) error

func (*Node) StopDockerCompose

func (h *Node) StopDockerCompose(timeout time.Duration) error

func (*Node) StopDockerComposeService

func (h *Node) StopDockerComposeService(composeFile string, service string, timeout time.Duration) error

func (*Node) StreamSSHCommand

func (h *Node) StreamSSHCommand(env []string, timeout time.Duration, command string) error

StreamSSHCommand streams the execution of an SSH command on the node.

func (*Node) SyncSubnets

func (h *Node) SyncSubnets(subnetsToTrack []string) error

SyncSubnets reconfigures odysseygo to sync subnets

func (*Node) UntimedForward

func (h *Node) UntimedForward(httpRequest string) ([]byte, error)

UntimedForward forwards the TCP connection to a remote address. Does not support timeouts on the operation.

func (*Node) UntimedMkdirAll

func (h *Node) UntimedMkdirAll(remoteDir string) error

UntimedMkdirAll creates a folder on the remote server. Does not support timeouts on the operation.

func (*Node) Upload

func (h *Node) Upload(localFile string, remoteFile string, timeout time.Duration) error

Upload uploads a local file to a remote file on the node.

func (*Node) UploadBytes

func (h *Node) UploadBytes(data []byte, remoteFile string, timeout time.Duration) error

UploadBytes uploads a byte array to a remote file on the host.

func (*Node) ValidateComposeFile

func (h *Node) ValidateComposeFile(composeFile string, timeout time.Duration) error

ValidateComposeFile validates a docker-compose file on a remote node.

func (*Node) ValidatePrimaryNetwork

func (h *Node) ValidatePrimaryNetwork(
	network odyssey.Network,
	validatorParams validator.PrimaryNetworkValidatorParams,
	wallet wallet.Wallet,
) (ids.ID, error)

ValidatePrimaryNetwork adds node as primary network validator. It adds the node in the specified network (Testnet / Mainnet / Devnet) and uses the wallet provided in the argument to pay for the transaction fee

func (*Node) WaitForOdysseyGoHealth

func (h *Node) WaitForOdysseyGoHealth(timeout time.Duration) error

WaitForSSHShell waits for the SSH shell to be available on the node within the specified timeout.

func (*Node) WaitForPort

func (h *Node) WaitForPort(port uint, timeout time.Duration) error

WaitForPort waits for the SSH port to become available on the node.

func (*Node) WaitForSSHShell

func (h *Node) WaitForSSHShell(timeout time.Duration) error

WaitForSSHShell waits for the SSH shell to be available on the node within the specified timeout.

func (*Node) WasNodeSetupWithMonitoring

func (h *Node) WasNodeSetupWithMonitoring() (bool, error)

WasNodeSetupWithMonitoring checks if an OdysseyGo node was setup with monitoring on a remote node.

type NodeParams

type NodeParams struct {
	// Count is how many Odyssey Nodes to be created during CreateNodes
	Count int

	// Roles pertain to whether the created node is going to be a Validator / API / Monitoring
	// node. See CheckRoles to see which combination of roles for a node is supported.
	Roles []SupportedRole

	// Network is whether the Validator / API node is meant to track OdysseyGo Primary Network
	// in Testnet / Mainnet / Devnet
	Network odyssey.Network

	// SubnetIDs is the list of subnet IDs that the created nodes will be tracking
	// For primary network, it should be empty
	SubnetIDs []string

	// SSHPrivateKeyPath is the file path to the private key of the SSH key pair that is used
	// to gain access to the created nodes
	SSHPrivateKeyPath string

	// OdysseyGoVersion is the version of Odyssey Go to install in the created node
	OdysseyGoVersion string
}

NodeParams is an input for CreateNodes

type NodeResult

type NodeResult struct {
	// ID of the host
	NodeID string

	// Value is the result of the command executed on the host
	Value interface{}

	// Err is the error that occurred while executing the command on the host
	Err error
}

NodeResult is a struct that holds the result of a async command executed on a host

type NodeResults

type NodeResults struct {
	Results []NodeResult
	Lock    sync.Mutex
}

NodeResults is a struct that holds the results of multiple async commands executed on multiple hosts

func (*NodeResults) AddResult

func (nr *NodeResults) AddResult(nodeID string, value interface{}, err error)

AddResult adds a new NodeResult to the NodeResults struct.

Parameters: - nodeID: the ID of the host. - value: the result of the command executed on the host. - err: the error that occurred while executing the command on the host.

func (*NodeResults) Error

func (nr *NodeResults) Error() error

SumError collects and returns the errors with nodeIds if there are errors in the NodeResults.

Returns an error type.

func (*NodeResults) GetErrorHostMap

func (nr *NodeResults) GetErrorHostMap() map[string]error

GetErrorHostMap returns a map of the errors of the NodeResults with the nodeID as the key.

It acquires the lock on the NodeResults and iterates over the Results slice. For each NodeResult, if the Err field is not nil, it adds the NodeID as the key and the error as the value to the hostErrors map. Finally, it releases the lock and returns the hostErrors map.

Returns: - map[string]error: A map with the nodeIDs as keys and the corresponding errors as values.

func (*NodeResults) GetErrorHosts

func (nr *NodeResults) GetErrorHosts() []string

GetErrorHosts returns a list of the nodeIDs of the NodeResults that have errors.

No parameters. Returns a slice of strings.

func (*NodeResults) GetNodeList

func (nr *NodeResults) GetNodeList() []string

GetNodeList returns a list of the nodeIDs of the NodeResults.

No parameters. Returns a slice of strings.

func (*NodeResults) GetResultMap

func (nr *NodeResults) GetResultMap() map[string]interface{}

GetResultMap returns a map of the results of the NodeResults with the nodeID as the key.

It acquires the lock on the NodeResults and iterates over the Results slice. For each NodeResult, it adds the NodeID as the key and the Value as the value to the result map. Finally, it releases the lock and returns the result map.

Returns: - map[string]interface{}: A map with the nodeIDs as keys and the corresponding values as values.

func (*NodeResults) GetResults

func (nr *NodeResults) GetResults() []NodeResult

GetResults returns the results of the NodeResults

No parameters. Returns: - []NodeResult: the results of the NodeResults.

func (*NodeResults) HasErrors

func (nr *NodeResults) HasErrors() bool

HasErrors returns true if the NodeResults has any errors.

It checks the length of the error host map obtained from the GetErrorHostMap() method of the NodeResults struct. If the length is greater than 0, it means that there are errors present, and the function returns true. Otherwise, it returns false.

func (*NodeResults) HasNodeIDWithError

func (nr *NodeResults) HasNodeIDWithError(nodeID string) bool

HasNodeIDWithError checks if a node with the given nodeID has an error.

Parameters: - nodeID: the ID of the node to check.

Return: - bool: true if a node with the given nodeID has an error, false otherwise.

func (*NodeResults) Len

func (nr *NodeResults) Len() int

Len returns the number of results in the NodeResults.

It acquires the lock on the NodeResults and returns the length of the Results slice. The lock is released before the function returns.

Returns: - int: the number of results in the NodeResults.

type SSHConfig

type SSHConfig struct {
	// Username to use when connecting to the node
	User string

	// Path to the private key to use when connecting to the node
	// If this is empty, the SSH agent will be used
	PrivateKeyPath string

	// Parameters to pass to the ssh command.
	// See man ssh_config(5) for more information
	// By defalult it's StrictHostKeyChecking=no
	Params map[string]string // additional parameters to pass to the ssh command
}

SSHConfig contains the configuration for connecting to a node over SSH

type SupportedRole

type SupportedRole int
const (
	Validator SupportedRole = iota
	API
	Loadtest
	Monitor
)

func NewSupportedRole

func NewSupportedRole(s string) SupportedRole

NewSupportedRole converts a string to a SupportedRole

func (*SupportedRole) String

func (r *SupportedRole) String() string

String returns the string representation of the SupportedRole

type TestHelper

type TestHelper struct {
	// contains filtered or unexported fields
}

TestHelper provides utility functions for testing

func NewTestHelper

func NewTestHelper(t *testing.T) *TestHelper

NewTestHelper creates a new TestHelper

func (*TestHelper) AssertCloudParams

func (th *TestHelper) AssertCloudParams(cp interface{}, expectedRegion, expectedImageID, expectedInstanceType string)

AssertCloudParams validates cloud parameters - removed with cloud functionality

func (*TestHelper) AssertEnvironment

func (th *TestHelper) AssertEnvironment(env []string, expectedVars []string)

AssertEnvironment validates environment variables

func (*TestHelper) AssertErrorContains

func (th *TestHelper) AssertErrorContains(err error, expectedText string)

AssertErrorContains checks if an error contains expected text

func (*TestHelper) AssertFileContent

func (th *TestHelper) AssertFileContent(content []byte, expected string)

AssertFileContent validates file content

func (*TestHelper) AssertNoError

func (th *TestHelper) AssertNoError(err error)

AssertNoError checks that there is no error

func (*TestHelper) AssertNodeProperties

func (th *TestHelper) AssertNodeProperties(node Node, expectedNodeID, expectedIP string, expectedRoles []SupportedRole)

AssertNodeProperties validates node properties

func (*TestHelper) AssertRoleCombination

func (th *TestHelper) AssertRoleCombination(roles []SupportedRole, shouldBeValid bool)

AssertRoleCombination validates role combinations

func (*TestHelper) AssertSSHConfig

func (th *TestHelper) AssertSSHConfig(config SSHConfig, expectedUser, expectedKeyPath string)

AssertSSHConfig validates SSH configuration

func (*TestHelper) AssertTimeoutHandling

func (th *TestHelper) AssertTimeoutHandling(operation func(time.Duration) error, timeout time.Duration)

AssertTimeoutHandling checks timeout handling

func (*TestHelper) CreateTestCloudParams

func (th *TestHelper) CreateTestCloudParams(cloud interface{}) interface{}

CreateTestCloudParams creates test cloud parameters for different clouds - removed with cloud functionality

func (*TestHelper) CreateTestComposeFile

func (th *TestHelper) CreateTestComposeFile() string

CreateTestComposeFile creates a temporary docker-compose file for testing

func (*TestHelper) CreateTestEnvironment

func (th *TestHelper) CreateTestEnvironment() []string

CreateTestEnvironment creates test environment variables

func (*TestHelper) CreateTestFileContent

func (th *TestHelper) CreateTestFileContent() []byte

CreateTestFileContent creates test file content

func (*TestHelper) CreateTestGCPCredentials

func (th *TestHelper) CreateTestGCPCredentials() string

CreateTestGCPCredentials creates a temporary GCP credentials file for testing

func (*TestHelper) CreateTestNetwork

func (th *TestHelper) CreateTestNetwork() odyssey.Network

CreateTestNetwork creates a test network

func (*TestHelper) CreateTestNode

func (th *TestHelper) CreateTestNode() Node

CreateTestNode creates a test node with default values

func (*TestHelper) CreateTestNodeParams

func (th *TestHelper) CreateTestNodeParams() *NodeParams

CreateTestNodeParams creates test node parameters

func (*TestHelper) CreateTestNodeWithCloud

func (th *TestHelper) CreateTestNodeWithCloud(cloud interface{}) Node

CreateTestNodeWithCloud creates a test node with specific cloud - removed with cloud functionality

func (*TestHelper) CreateTestNodeWithRole

func (th *TestHelper) CreateTestNodeWithRole(role SupportedRole) Node

CreateTestNodeWithRole creates a test node with specific role

func (*TestHelper) CreateTestNodes

func (th *TestHelper) CreateTestNodes(count int) []Node

CreateTestNodes creates multiple test nodes

func (*TestHelper) CreateTestSSHConfig

func (th *TestHelper) CreateTestSSHConfig() SSHConfig

CreateTestSSHConfig creates test SSH configuration

func (*TestHelper) CreateTestSSHKey

func (th *TestHelper) CreateTestSSHKey() string

CreateTestSSHKey creates a temporary SSH key file for testing

func (*TestHelper) CreateTestSubnetIDs

func (th *TestHelper) CreateTestSubnetIDs() []string

CreateTestSubnetIDs creates test subnet IDs

func (*TestHelper) CreateTestTimeout

func (th *TestHelper) CreateTestTimeout() time.Duration

CreateTestTimeout creates a test timeout

func (*TestHelper) ValidateTestEnvironment

func (th *TestHelper) ValidateTestEnvironment()

ValidateTestEnvironment checks if the test environment is properly set up

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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