1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

chore: fix many unit test style warnings (#488)

Signed-off-by: James Hillyerd <james@hillyerd.com>
This commit is contained in:
James Hillyerd
2024-02-15 18:52:50 -08:00
committed by GitHub
parent ea585c4851
commit fc8ea530bb
6 changed files with 37 additions and 35 deletions

View File

@@ -435,11 +435,12 @@ Hi!
// playSession creates a new session, reads the greeting and then plays the script
func playSession(t *testing.T, server *Server, script []scriptStep) error {
t.Helper()
pipe := setupSMTPSession(t, server)
c := textproto.NewConn(pipe)
if code, _, err := c.ReadCodeLine(220); err != nil {
return fmt.Errorf("Expected a 220 greeting, got %v", code)
return fmt.Errorf("expected a 220 greeting, got %v", code)
}
err := playScriptAgainst(t, c, script)
@@ -596,6 +597,7 @@ func setupSMTPServer(ds storage.Store, extHost *extension.Host) *Server {
var sessionNum int
func setupSMTPSession(t *testing.T, server *Server) net.Conn {
t.Helper()
logger := zerolog.New(zerolog.NewTestWriter(t))
serverConn, clientConn := net.Pipe()