Documentation
¶
Overview ¶
Package problemtest helps tests of notesd's problem records: a fake problem.Recorder, and a datagram socket that stands in for the journal, whose records are decoded and checked with github.com/frostyard/std/problems.
Index ¶
Constants ¶
const AppID = "org.frostyard.Frostnotes"
AppID is the app ID of every frostnotes record.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fake ¶
type Fake struct {
// contains filtered or unexported fields
}
Fake is a problem.Recorder that keeps the codes it gets.
type Journal ¶
type Journal struct {
// Path is the socket's path, for problems.WithSocket.
Path string
// contains filtered or unexported fields
}
Journal is a unixgram socket in a temporary folder that takes records in place of the journal's socket.
func Listen ¶
Listen binds a Journal in a short temporary folder (a socket's path holds at most 108 bytes, more than a test's TempDir can leave); it closes, and the folder is removed, when the test ends.