mirror of
https://github.com/golang/net.git
synced 2026-03-31 18:37:08 +09:00
newServerTester is used to create an HTTP/2 server for testing. It returns a *serverTester, which includes a number of methods for sending frames to and reading frames from a server connection under test. Many tests also use newServerTester to simply start an *httptest.Server. These tests pass an "optOnlyServer" to indicate that they don't need a client connection to interact with. They interact with the *httptest.Server, and use no methods or fields of *serverTester. Make a clearer distinction between test types. Add a newTestServer function which starts and returns an *httptest.Server. This function replaces use of newServerTester with optOnlyServer. Change-Id: Ia590c9b4dcc23c17e530b0cc273b9120965da11a Reviewed-on: https://go-review.googlesource.com/c/net/+/586155 Reviewed-by: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>