e2e

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 26 Imported by: 2

Documentation

Index

Constants

View Source
const (
	SlackTestServerPort = 7100
	PagerDutyTestPort   = 7200
)

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()

	TestSlackSvr        *TestSlackServer
	TestPagerDutyServer *TestPagerDutyServer
	// 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()

	TestSlackSvr        *TestSlackServer
	TestPagerDutyServer *TestPagerDutyServer
	// 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 TestPagerDutyServer added in v1.0.0

type TestPagerDutyServer struct {
	Server   *httptest.Server
	Payloads []*client.PagerDutyRequest
}

TestPagerDutyServer ... Mock server for testing pagerduty alerts

func NewTestPagerDutyServer added in v1.0.0

func NewTestPagerDutyServer(url string, port int) *TestPagerDutyServer

NewTestPagerDutyServer ... Creates a new mock pagerduty server

func (*TestPagerDutyServer) ClearAlerts added in v1.0.0

func (svr *TestPagerDutyServer) ClearAlerts()

ClearAlerts ... Clears the alerts

func (*TestPagerDutyServer) Close added in v1.0.0

func (svr *TestPagerDutyServer) Close()

Close ... Closes the server

func (*TestPagerDutyServer) PagerDutyAlerts added in v1.0.0

func (svr *TestPagerDutyServer) PagerDutyAlerts() []*client.PagerDutyRequest

PagerDutyAlerts ... Returns the pagerduty alerts

type TestSlackServer added in v1.0.0

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

TestSlackServer ... Mock server for testing slack alerts

func NewTestSlackServer added in v1.0.0

func NewTestSlackServer(url string, port int) *TestSlackServer

NewTestSlackServer ... Creates a new mock slack server

func (*TestSlackServer) ClearAlerts added in v1.0.0

func (svr *TestSlackServer) ClearAlerts()

ClearAlerts ... Clears the alerts

func (*TestSlackServer) Close added in v1.0.0

func (svr *TestSlackServer) Close()

Close ... Closes the server

func (*TestSlackServer) SlackAlerts added in v1.0.0

func (svr *TestSlackServer) 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