Documentation
¶
Overview ¶
Package nettest contains additional test helpers related to network state that can't go into tstest for circular dependency reasons.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNetwork ¶ added in v1.84.0
GetNetwork returns the appropriate Network implementation based on whether the --use-test-memnet flag is set.
Each call generates a new network.
func NewHTTPServer ¶ added in v1.84.0
NewHTTPServer starts and returns a new httptest.Server. The caller should call Close when finished, to shut it down.
func NewUnstartedHTTPServer ¶ added in v1.84.0
NewUnstartedHTTPServer returns a new httptest.Server but doesn't start it.
After changing its configuration, the caller should call Start or StartTLS.
The caller should call Close when finished, to shut it down.
func PreferMemNetwork ¶ added in v1.84.0
func PreferMemNetwork() bool
PreferMemNetwork reports whether the --use-test-memnet flag is set.
func SkipIfNoNetwork ¶
SkipIfNoNetwork skips the test if it looks like there's no network access.
Types ¶
This section is empty.