Documentation
¶
Overview ¶
Package problemstest is a journal socket for tests of problem records (ADR-0049): a unixgram socket in a temporary folder that a recorder made with problems.WithSocket writes to, and the checks of what it received.
Index ¶
- Constants
- type Journal
- func (j *Journal) Next(t testing.TB) Record
- func (j *Journal) NextError(t testing.TB, component problems.Component, code string) Record
- func (j *Journal) NextPanic(t testing.TB, component problems.Component) Record
- func (j *Journal) None(t testing.TB)
- func (j *Journal) Recorder(t testing.TB, component problems.Component) *problems.Recorder
- type Record
Constants ¶
const AppID = config.AppID
AppID is the app ID of every Frostmail record.
const Version = "1.2.3"
Version is the release version the tests' recorders write.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Journal ¶
type Journal struct {
// Path is the socket's path, for problems.WithSocket.
Path string
// contains filtered or unexported fields
}
Journal is a test journal socket.
func Listen ¶
Listen binds a journal socket in a new temporary folder, which the test's end removes. The folder is short: a socket path has at most 107 bytes.
func (*Journal) NextError ¶
NextError reads the next record and checks that it is the error code of component, from a recorder made by j.Recorder.
func (*Journal) NextPanic ¶
NextPanic reads the next record and checks that it is a panic of component, from a recorder made by j.Recorder or with the same identity.