Documentation ¶
Index ¶
Constants ¶
const ( SlackTestServerPort = 7100 PagerDutyTestPort = 7200 )
Variables ¶
This section is empty.
Functions ¶
func DefaultTestConfig ¶
DefaultTestConfig ... Returns a default app config for testing
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