Commit ee706cfe authored by Leon Klingele's avatar Leon Klingele Committed by Brad Fitzpatrick

net/smtp: add missing error check in test

Change-Id: Ifcbd9d2961073a18a250f052180248d9bf223e97
GitHub-Last-Rev: 67f97d1ca07665979504264986e25522ed6799f8
GitHub-Pull-Request: golang/go#30018
Reviewed-on: https://go-review.googlesource.com/c/go/+/160442Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent d4318042
...@@ -656,9 +656,16 @@ func TestSendMailWithAuth(t *testing.T) { ...@@ -656,9 +656,16 @@ func TestSendMailWithAuth(t *testing.T) {
tc := textproto.NewConn(conn) tc := textproto.NewConn(conn)
tc.PrintfLine("220 hello world") tc.PrintfLine("220 hello world")
msg, err := tc.ReadLine() msg, err := tc.ReadLine()
if msg == "EHLO localhost" { if err != nil {
tc.PrintfLine("250 mx.google.com at your service") errCh <- fmt.Errorf("ReadLine error: %v", err)
return
}
const wantMsg = "EHLO localhost"
if msg != wantMsg {
errCh <- fmt.Errorf("unexpected response %q; want %q", msg, wantMsg)
return
} }
err = tc.PrintfLine("250 mx.google.com at your service")
if err != nil { if err != nil {
errCh <- fmt.Errorf("PrintfLine: %v", err) errCh <- fmt.Errorf("PrintfLine: %v", err)
return return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment