Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerizedNode ¶
type ContainerizedNode interface { Start() error Stop() error Reset() error Remove() error GetHTTPEndpoint() string GetWSEndpoint() string EthClient() *ethclient.Client EthWsClient() *ethclient.Client WaitForBlock(number uint64) error WaitForNextBlock() error DumpLogs() (string, error) }
ContainerizedNode is an interface for a containerized network.
func NewContainerizedNode ¶
func NewContainerizedNode( repository string, tag string, name string, httpAddress string, wsAddress string, env []string, ) (c ContainerizedNode, err error)
NewContainerizedNode creates an implementation of Localnet using Docker.
type FixtureConfig ¶
type FixtureConfig struct {
// contains filtered or unexported fields
}
FixtureConfig is a type defining the configuration of a TestFixture.
func NewFixtureConfig ¶
func NewFixtureConfig( configRelativePath, baseImage, localnetImage, containerName, httpAddress, wsAdddress, goVersion string, ) *FixtureConfig
NewFixtureConfig creates a new FixtureConfig and infers the config directory absolute path from given relative path. requires: the configRelativePath to be relative to the file calling NewFixtureConfig.
type TestFixture ¶
type TestFixture struct { ContainerizedNode // contains filtered or unexported fields }
TestFixture is a testing fixture that runs a single Polaris validator node in a Docker container.
func NewTestFixture ¶
func NewTestFixture(t ginkgo.FullGinkgoTInterface, config *FixtureConfig) *TestFixture
NewTestFixture creates a new TestFixture.
func (*TestFixture) GenerateTransactOpts ¶
func (tf *TestFixture) GenerateTransactOpts(name string) *bind.TransactOpts
GenerateTransactOpts generates a new transaction options object for a key by it's name.
func (*TestFixture) PrivKey ¶
func (tf *TestFixture) PrivKey(name string) *ecdsa.PrivateKey
func (*TestFixture) Teardown ¶
func (tf *TestFixture) Teardown() error
func (*TestFixture) ValAddr ¶
func (tf *TestFixture) ValAddr() common.Address