Commit 56093743 authored by Emmanuel Odeke's avatar Emmanuel Odeke Committed by Brad Fitzpatrick

net/http: testClientHead now in http2 mode

Change-Id: I21317e3f60502759efc026cdfdb0b1d5f411cae9
Reviewed-on: https://go-review.googlesource.com/17521
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent b220d416
......@@ -83,12 +83,15 @@ func TestClient(t *testing.T) {
}
}
func TestClientHead(t *testing.T) {
func TestClientHead_h1(t *testing.T) { testClientHead(t, false) }
func TestClientHead_h2(t *testing.T) { testClientHead(t, true) }
func testClientHead(t *testing.T, h2 bool) {
defer afterTest(t)
ts := httptest.NewServer(robotsTxtHandler)
defer ts.Close()
cst := newClientServerTest(t, h2, robotsTxtHandler)
defer cst.close()
r, err := Head(ts.URL)
r, err := cst.c.Head(cst.ts.URL)
if err != nil {
t.Fatal(err)
}
......
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