mirror of
https://github.com/hanzoai/o11y.git
synced 2026-10-15 12:58:33 +00:00
Go 1.26 changed net/textproto.Error.Error() to quote the message
("%03d %q"), so the rejection renders as `501 "5.5.4 Rejected!"` and the
substring match on `501 5.5.4 Rejected!` no longer holds. TestEmailRejected
has been failing on this toolchain ever since.
Unwrap to the *textproto.Error and assert Code and Msg instead. That is
stronger than the substring it replaces — it pins the numeric code and the
exact message rather than a fragment of a formatted string — and it does
not depend on how the stdlib renders the error.
The second failure in the same test was a cascade: the require above
aborted the test before srv.Shutdown ran, so the cleanup's ErrServerClosed
check saw a nil error from its own first shutdown.
go test ./...: 130 ok / 1 FAIL -> 131 ok / 0 FAIL.
Co-authored-by: Hanzo Dev <[email protected]>