mirror of
https://github.com/golang/go
synced 2024-11-21 22:24:40 -07:00
net/http: skip some test failed when httpmuxgo121=1
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
parent
5dcc04aeac
commit
875b8a6bdf
@ -12,6 +12,7 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"internal/godebug"
|
||||||
"io"
|
"io"
|
||||||
"math"
|
"math"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
@ -1535,6 +1536,9 @@ func TestSetPathValue(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestStatus(t *testing.T) {
|
func TestStatus(t *testing.T) {
|
||||||
|
if godebug.New("httpmuxgo121").Value() == "1" {
|
||||||
|
t.Skip("skipping test in TestStatus when httpmuxgo121=1")
|
||||||
|
}
|
||||||
// The main purpose of this test is to check 405 responses and the Allow header.
|
// The main purpose of this test is to check 405 responses and the Allow header.
|
||||||
h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
|
h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
|
||||||
mux := NewServeMux()
|
mux := NewServeMux()
|
||||||
|
@ -8,6 +8,7 @@ package http
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"internal/godebug"
|
||||||
"net/url"
|
"net/url"
|
||||||
"regexp"
|
"regexp"
|
||||||
"testing"
|
"testing"
|
||||||
@ -71,6 +72,9 @@ type handler struct{ i int }
|
|||||||
func (handler) ServeHTTP(ResponseWriter, *Request) {}
|
func (handler) ServeHTTP(ResponseWriter, *Request) {}
|
||||||
|
|
||||||
func TestFindHandler(t *testing.T) {
|
func TestFindHandler(t *testing.T) {
|
||||||
|
if godebug.New("httpmuxgo121").Value() == "1" {
|
||||||
|
t.Skip("skipping test in TestFindHandler when httpmuxgo121=1")
|
||||||
|
}
|
||||||
mux := NewServeMux()
|
mux := NewServeMux()
|
||||||
for _, ph := range []struct {
|
for _, ph := range []struct {
|
||||||
pat string
|
pat string
|
||||||
@ -133,6 +137,9 @@ func TestEmptyServeMux(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestRegisterErr(t *testing.T) {
|
func TestRegisterErr(t *testing.T) {
|
||||||
|
if godebug.New("httpmuxgo121").Value() == "1" {
|
||||||
|
t.Skip("skipping test in TestRegisterErr when httpmuxgo121=1")
|
||||||
|
}
|
||||||
mux := NewServeMux()
|
mux := NewServeMux()
|
||||||
h := &handler{}
|
h := &handler{}
|
||||||
mux.Handle("/a", h)
|
mux.Handle("/a", h)
|
||||||
|
Loading…
Reference in New Issue
Block a user