mirror of
https://github.com/golang/go.git
synced 2025-05-30 19:52:53 +00:00
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/+/160442 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
d431804295
commit
ee706cfe83
@ -656,9 +656,16 @@ func TestSendMailWithAuth(t *testing.T) {
|
||||
tc := textproto.NewConn(conn)
|
||||
tc.PrintfLine("220 hello world")
|
||||
msg, err := tc.ReadLine()
|
||||
if msg == "EHLO localhost" {
|
||||
tc.PrintfLine("250 mx.google.com at your service")
|
||||
if err != nil {
|
||||
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 {
|
||||
errCh <- fmt.Errorf("PrintfLine: %v", err)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user