aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/sniff_test.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2015-12-09 22:02:46 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2015-12-10 04:43:08 +0000
commitc2ef005486fa05cbeddc74c7faac8f6a867703d4 (patch)
treec96bea2c128d9f61b8e359ab3fed1ccc14eca59b /src/net/http/sniff_test.go
parent07f9c25b357d2eb1305e5016a967df1b00d345bd (diff)
downloadgo-c2ef005486fa05cbeddc74c7faac8f6a867703d4.tar.xz
net/http: run more tests in http2 mode
Failing ones are marked skipped. Fixes #13543 (was just a test issue) Updates #13555 (to be fixed later) Updates #13556 (to be fixed later) Updates #13557 (to be fixed later) Fixes bug in golang.org/cl/17428 (http1 now uses HTTP status 431, not 413) Change-Id: I8f7431fee35f2fc081cfe2c232ae75a00800a60b Reviewed-on: https://go-review.googlesource.com/17683 Reviewed-by: Blake Mizerany <blake.mizerany@gmail.com> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Burcu Dogan <jbd@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/net/http/sniff_test.go')
-rw-r--r--src/net/http/sniff_test.go19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/net/http/sniff_test.go b/src/net/http/sniff_test.go
index a776261cc1..e0085516da 100644
--- a/src/net/http/sniff_test.go
+++ b/src/net/http/sniff_test.go
@@ -51,8 +51,8 @@ func TestDetectContentType(t *testing.T) {
}
}
-func TestServerContentType_h1(t *testing.T) { testServerContentType(t, false) }
-func TestServerContentType_h2(t *testing.T) { testServerContentType(t, true) }
+func TestServerContentType_h1(t *testing.T) { testServerContentType(t, h1Mode) }
+func TestServerContentType_h2(t *testing.T) { testServerContentType(t, h2Mode) }
func testServerContentType(t *testing.T, h2 bool) {
defer afterTest(t)
@@ -87,9 +87,8 @@ func testServerContentType(t *testing.T, h2 bool) {
// Issue 5953: shouldn't sniff if the handler set a Content-Type header,
// even if it's the empty string.
-func TestServerIssue5953_h1(t *testing.T) { testServerIssue5953(t, false) }
-func TestServerIssue5953_h2(t *testing.T) { testServerIssue5953(t, true) }
-
+func TestServerIssue5953_h1(t *testing.T) { testServerIssue5953(t, h1Mode) }
+func TestServerIssue5953_h2(t *testing.T) { testServerIssue5953(t, h2Mode) }
func testServerIssue5953(t *testing.T, h2 bool) {
defer afterTest(t)
cst := newClientServerTest(t, h2, HandlerFunc(func(w ResponseWriter, r *Request) {
@@ -111,9 +110,8 @@ func testServerIssue5953(t *testing.T, h2 bool) {
resp.Body.Close()
}
-func TestContentTypeWithCopy_h1(t *testing.T) { testContentTypeWithCopy(t, false) }
-func TestContentTypeWithCopy_h2(t *testing.T) { testContentTypeWithCopy(t, true) }
-
+func TestContentTypeWithCopy_h1(t *testing.T) { testContentTypeWithCopy(t, h1Mode) }
+func TestContentTypeWithCopy_h2(t *testing.T) { testContentTypeWithCopy(t, h2Mode) }
func testContentTypeWithCopy(t *testing.T, h2 bool) {
defer afterTest(t)
@@ -148,9 +146,8 @@ func testContentTypeWithCopy(t *testing.T, h2 bool) {
resp.Body.Close()
}
-func TestSniffWriteSize_h1(t *testing.T) { testSniffWriteSize(t, false) }
-func TestSniffWriteSize_h2(t *testing.T) { testSniffWriteSize(t, true) }
-
+func TestSniffWriteSize_h1(t *testing.T) { testSniffWriteSize(t, h1Mode) }
+func TestSniffWriteSize_h2(t *testing.T) { testSniffWriteSize(t, h2Mode) }
func testSniffWriteSize(t *testing.T, h2 bool) {
defer afterTest(t)
cst := newClientServerTest(t, h2, HandlerFunc(func(w ResponseWriter, r *Request) {