Documentation
¶
Index ¶
- func AssertAuditPayloads(t *testing.T, h *test.Hook, expected []*audit.Payload)
- func AssertLoggingOutput(h *test.Hook, expected []ExpectedLogEntry) error
- func LogForTesting(t *testing.T) (*test.Hook, *logrus.Entry)
- func New() (*test.Hook, *logrus.Entry)
- func NewAudit() (*test.Hook, *logrus.Entry)
- func NewOtelAuditClient() audit.Client
- type ExpectedLogEntry
- type MockAudit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertAuditPayloads ¶
AssertAuditPayload compares the audit payloads in `h` with the given expected payloads
func AssertLoggingOutput ¶
func AssertLoggingOutput(h *test.Hook, expected []ExpectedLogEntry) error
AssertLoggingOutput compares the logs on `h` with the expected entries in `expected`. It returns a slice of errors encountered, with a zero length if no assertions failed.
func NewAudit ¶
NewAudit creates a logging hook and entry suitable for testing the IFXAudit feature.
func NewOtelAuditClient ¶
Types ¶
type ExpectedLogEntry ¶
type ExpectedLogEntry map[string]types.GomegaMatcher
Click to show internal directories.
Click to hide internal directories.