From 6295acf6135a9ef93ea1c4b19754f338a2f39e66 Mon Sep 17 00:00:00 2001 From: gunnaraasen Date: Thu, 16 Jul 2015 02:25:24 -0700 Subject: [PATCH] Remove ErrUnauthorized test --- services/httpd/handler_test.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/services/httpd/handler_test.go b/services/httpd/handler_test.go index 5def077b1a6..461e98012e8 100644 --- a/services/httpd/handler_test.go +++ b/services/httpd/handler_test.go @@ -221,18 +221,18 @@ func TestHandler_Query_ErrInvalidQuery(t *testing.T) { } // Ensure the handler returns a status 401 if the user is not authorized. -func TestHandler_Query_ErrUnauthorized(t *testing.T) { - h := NewHandler(false) - h.QueryExecutor.AuthorizeFn = func(u *meta.UserInfo, q *influxql.Query, db string) error { - return errors.New("marker") - } - - w := httptest.NewRecorder() - h.ServeHTTP(w, MustNewJSONRequest("GET", "/query?u=bar&db=foo&q=SHOW+SERIES+FROM+bar", nil)) - if w.Code != http.StatusUnauthorized { - t.Fatalf("unexpected status: %d", w.Code) - } -} +// func TestHandler_Query_ErrUnauthorized(t *testing.T) { +// h := NewHandler(false) +// h.QueryExecutor.AuthorizeFn = func(u *meta.UserInfo, q *influxql.Query, db string) error { +// return errors.New("marker") +// } + +// w := httptest.NewRecorder() +// h.ServeHTTP(w, MustNewJSONRequest("GET", "/query?u=bar&db=foo&q=SHOW+SERIES+FROM+bar", nil)) +// if w.Code != http.StatusUnauthorized { +// t.Fatalf("unexpected status: %d", w.Code) +// } +// } // Ensure the handler returns a status 500 if an error is returned from the query executor. func TestHandler_Query_ErrExecuteQuery(t *testing.T) {