Documentation
¶
Index ¶
- Variables
- func CheckNodeStarted(t *testing.T, gossamerHost string) error
- func DecodeRPC(t *testing.T, body []byte, target interface{}) error
- func KillProcess(t *testing.T, cmd *exec.Cmd) error
- func PostRPC(t *testing.T, method, host, params string) ([]byte, error)
- func TearDown(t *testing.T, nodes []*Node) (errorList []error)
- type ErrCode
- type Error
- type Node
- type ServerResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GOSSAMER_INTEGRATION_TEST_MODE = os.Getenv("GOSSAMER_INTEGRATION_TEST_MODE") HOSTNAME = os.Getenv("HOSTNAME") PORT = os.Getenv("PORT") NETWORK_SIZE = os.Getenv("NETWORK_SIZE") ContentTypeJSON = "application/json" )
nolint
View Source
var (
// BaseRPCPort is the starting RPC port for test nodes
BaseRPCPort = 8540
)
TODO: #799
Functions ¶
func CheckNodeStarted ¶
CheckNodeStarted check if gossamer node is already started
func KillProcess ¶
KillProcess kills a instance of gossamer
Types ¶
type Error ¶
type Error struct {
Message string `json:"message"`
ErrorCode ErrCode `json:"code"`
Data map[string]interface{} `json:"data"`
}
Error is a struct that holds the error message and the error code for a error
type Node ¶
Node represents a gossamer process
func RunGossamer ¶
RunGossamer will start a gossamer instance and check if its online and returns CMD, otherwise return err
type ServerResponse ¶
type ServerResponse struct {
// JSON-RPC Version
Version string `json:"jsonrpc"`
// Resulting values
Result json.RawMessage `json:"result"`
// Any generated errors
Error *Error `json:"error"`
// Request id
ID *json.RawMessage `json:"id"`
}
ServerResponse wraps the RPC response
Click to show internal directories.
Click to hide internal directories.