Fix fake_handler test in Go 1.6

pull/6/head
Wojciech Tyczynski 2016-03-09 11:16:37 +01:00
parent aca37830b1
commit 46ba2bfc89
1 changed files with 6 additions and 6 deletions

View File

@ -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()