mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 04:32:37 +00:00
Fix fake_handler test in Go 1.6
This commit is contained in:
@@ -24,7 +24,7 @@ import (
|
||||
)
|
||||
|
||||
func TestFakeHandlerPath(t *testing.T) {
|
||||
handler := FakeHandler{}
|
||||
handler := FakeHandler{StatusCode: http.StatusOK}
|
||||
server := httptest.NewServer(&handler)
|
||||
// TODO: Uncomment when fix #19254
|
||||
// defer server.Close()
|
||||
@@ -47,7 +47,7 @@ func TestFakeHandlerPath(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFakeHandlerPathNoBody(t *testing.T) {
|
||||
handler := FakeHandler{}
|
||||
handler := FakeHandler{StatusCode: http.StatusOK}
|
||||
server := httptest.NewServer(&handler)
|
||||
// TODO: Uncomment when fix #19254
|
||||
// defer server.Close()
|
||||
@@ -79,7 +79,7 @@ func (f *fakeError) Errorf(format string, args ...interface{}) {
|
||||
func (f *fakeError) Logf(format string, args ...interface{}) {}
|
||||
|
||||
func TestFakeHandlerWrongPath(t *testing.T) {
|
||||
handler := FakeHandler{}
|
||||
handler := FakeHandler{StatusCode: http.StatusOK}
|
||||
server := httptest.NewServer(&handler)
|
||||
// TODO: Uncomment when fix #19254
|
||||
// defer server.Close()
|
||||
@@ -105,7 +105,7 @@ func TestFakeHandlerWrongPath(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFakeHandlerWrongMethod(t *testing.T) {
|
||||
handler := FakeHandler{}
|
||||
handler := FakeHandler{StatusCode: http.StatusOK}
|
||||
server := httptest.NewServer(&handler)
|
||||
// TODO: Uncomment when fix #19254
|
||||
// defer server.Close()
|
||||
@@ -131,7 +131,7 @@ func TestFakeHandlerWrongMethod(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFakeHandlerWrongBody(t *testing.T) {
|
||||
handler := FakeHandler{}
|
||||
handler := FakeHandler{StatusCode: http.StatusOK}
|
||||
server := httptest.NewServer(&handler)
|
||||
// TODO: Uncomment when fix #19254
|
||||
// defer server.Close()
|
||||
@@ -159,7 +159,7 @@ func TestFakeHandlerWrongBody(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFakeHandlerNilBody(t *testing.T) {
|
||||
handler := FakeHandler{}
|
||||
handler := FakeHandler{StatusCode: http.StatusOK}
|
||||
server := httptest.NewServer(&handler)
|
||||
// TODO: Uncomment when fix #19254
|
||||
// defer server.Close()
|
||||
|
Reference in New Issue
Block a user