Documentation ¶
Index ¶
- type ExpectedError
- type Fullenv
- func (fe *Fullenv) ClientConfig(name string) (string, error)
- func (fe *Fullenv) Error() error
- func (fe *Fullenv) LoadClient(name string) (*xbus.Client, error)
- func (fe *Fullenv) LoadClientConfig(name string) (xbus.COptions, error)
- func (fe *Fullenv) SetVar(key, value string)
- func (fe *Fullenv) SetVars(values map[string]string)
- func (fe *Fullenv) Start() error
- func (fe *Fullenv) StartClients() error
- func (fe *Fullenv) Stop() error
- type MatchMessage
- type TestLogger
- func (m TestLogger) Debugf(format string, v ...interface{})
- func (m *TestLogger) Errorf(format string, v ...interface{})
- func (m *TestLogger) ExpectsError(expectedError interface{})
- func (m TestLogger) Fatalf(format string, v ...interface{})
- func (m TestLogger) Noticef(format string, v ...interface{})
- func (m TestLogger) Tracef(format string, v ...interface{})
- func (m TestLogger) VerifyExpectations()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExpectedError ¶
type ExpectedError struct { MatchMessage MatchMessage Name string }
ExpectedError is the definition of an expected error
func ExpectsContains ¶
func ExpectsContains(value string) ExpectedError
ExpectsContains returns a ExpectedError matching a partial message
func ExpectsEqual ¶
func ExpectsEqual(value string) ExpectedError
ExpectsEqual returns a ExpectedError matching a message exactly
type Fullenv ¶
type Fullenv struct {
// contains filtered or unexported fields
}
Fullenv uses the xbus-fullenv binary to coordinate tests
func NewFullenv ¶
NewFullenv instanciate a Fullenv
func NewFullenvForTest ¶
NewFullenvForTest returns a fullenv associated to the giveng test
func (*Fullenv) ClientConfig ¶
ClientConfig returns the configuration path of a given client
func (*Fullenv) LoadClient ¶
LoadClient loads a client instance
func (*Fullenv) LoadClientConfig ¶
LoadClientConfig load the xbus.COptions of a client
func (*Fullenv) StartClients ¶
StartClients sends the 'startup' command to xbus-fullenv
type MatchMessage ¶
MatchMessage is a function that match a log message
type TestLogger ¶
type TestLogger struct {
// contains filtered or unexported fields
}
TestLogger is a BusLogger for tests
func GetTestLogger ¶
func GetTestLogger(t testing.TB) *TestLogger
GetTestLogger returns a new BusLogger for the passed testing.T
func (TestLogger) Debugf ¶
func (m TestLogger) Debugf(format string, v ...interface{})
Debugf passes the message to T.Logf
func (*TestLogger) Errorf ¶
func (m *TestLogger) Errorf(format string, v ...interface{})
Errorf passes the message to T.Errorf
func (*TestLogger) ExpectsError ¶
func (m *TestLogger) ExpectsError(expectedError interface{})
ExpectsError anticipate an error and make it non-fatal to the test
func (TestLogger) Fatalf ¶
func (m TestLogger) Fatalf(format string, v ...interface{})
Fatalf passes the message to T.Fatalf
func (TestLogger) Noticef ¶
func (m TestLogger) Noticef(format string, v ...interface{})
Noticef passes the message to T.Logf
func (TestLogger) Tracef ¶
func (m TestLogger) Tracef(format string, v ...interface{})
Tracef passes the message to T.Logf
func (TestLogger) VerifyExpectations ¶
func (m TestLogger) VerifyExpectations()
VerifyExpectations enforce error expectations