e2e

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 22 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTestConfig

func DefaultTestConfig() *config.Config

DefaultTestConfig ... Returns a default app config for testing

func WaitForTransaction

func WaitForTransaction(hash common.Hash, client *ethclient.Client, timeout time.Duration) (*types.Receipt, error)

WaitForTransaction ... Waits for a transaction receipt to be generated or times out

Types

type L2TestSuite

type L2TestSuite struct {
	L2Geth *op_e2e.OpGeth
	L2Cfg  *op_e2e.SystemConfig

	App    *app.Application
	AppCfg *config.Config
	Close  func()

	TestSvr *TestServer
	// contains filtered or unexported fields
}

L2TestSuite ... Stores all the information needed to run an e2e L2Geth test

func CreateL2TestSuite

func CreateL2TestSuite(t *testing.T) *L2TestSuite

CreateSysTestSuite ... Creates a new L2Geth test suite

type SysTestSuite

type SysTestSuite struct {
	Cfg *op_e2e.SystemConfig
	Sys *op_e2e.System

	App    *app.Application
	AppCfg *config.Config
	Close  func()

	TestSvr *TestServer
	// contains filtered or unexported fields
}

SysTestSuite ... Stores all the information needed to run an e2e system test

func CreateSysTestSuite

func CreateSysTestSuite(t *testing.T) *SysTestSuite

CreateSysTestSuite ... Creates a new SysTestSuite

type TestServer

type TestServer struct {
	Server   *httptest.Server
	Payloads []*client.SlackPayload
}

TestServer ... Mock server for testing slack alerts

func NewTestServer

func NewTestServer() *TestServer

NewTestServer ... Creates a new mock slack server

func (*TestServer) ClearAlerts

func (svr *TestServer) ClearAlerts()

ClearAlerts ... Clears the alerts

func (*TestServer) Close

func (svr *TestServer) Close()

Close ... Closes the server

func (*TestServer) SlackAlerts

func (svr *TestServer) SlackAlerts() []*client.SlackPayload

SlackAlerts ... Returns the slack alerts

Jump to

Keyboard shortcuts

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