mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net: add helpers for server testing
Also moves a few server test helpers into mockserver_test.go. Change-Id: I5a95c9bc6f0c4683751bcca77e26a8586a377466 Reviewed-on: https://go-review.googlesource.com/9106 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
f9bc9a7a2e
commit
832c573595
5 changed files with 250 additions and 55 deletions
|
|
@ -317,6 +317,11 @@ second:
|
|||
return nil
|
||||
}
|
||||
switch err := nestedErr.(type) {
|
||||
case *AddrError, addrinfoErrno, *DNSError, InvalidAddrError, *ParseError, *timeoutError, UnknownNetworkError:
|
||||
return nil
|
||||
case *DNSConfigError:
|
||||
nestedErr = err.Err
|
||||
goto third
|
||||
case *os.SyscallError:
|
||||
nestedErr = err.Err
|
||||
goto third
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue