[ARVADOS] updated: 5c860fdbf28128e7d11a9dff8b5c30777c2cbfeb

Git user git at public.curoverse.com
Tue Jun 27 13:47:45 EDT 2017


Summary of changes:
 services/ws/server_test.go | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

       via  5c860fdbf28128e7d11a9dff8b5c30777c2cbfeb (commit)
      from  c5a8ad7751e13560a6cde34395ea76f380c8a80d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 5c860fdbf28128e7d11a9dff8b5c30777c2cbfeb
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Jun 27 13:43:25 2017 -0400

    11901: Test 404 when health checks disabled.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curoverse.com>

diff --git a/services/ws/server_test.go b/services/ws/server_test.go
index da7440d..a0c4c8c 100644
--- a/services/ws/server_test.go
+++ b/services/ws/server_test.go
@@ -65,6 +65,7 @@ func (s *serverSuite) TestBadDB(c *check.C) {
 
 func (s *serverSuite) TestHealth(c *check.C) {
 	go s.srv.Run()
+	defer s.srv.Close()
 	s.srv.WaitReady()
 	for _, token := range []string{"", "foo", s.cfg.ManagementToken} {
 		req, err := http.NewRequest("GET", "http://"+s.srv.listener.Addr().String()+"/_health/ping", nil)
@@ -84,3 +85,18 @@ func (s *serverSuite) TestHealth(c *check.C) {
 		}
 	}
 }
+
+func (s *serverSuite) TestHealthDisabled(c *check.C) {
+	s.cfg.ManagementToken = ""
+
+	go s.srv.Run()
+	defer s.srv.Close()
+	s.srv.WaitReady()
+
+	req, err := http.NewRequest("GET", "http://"+s.srv.listener.Addr().String()+"/_health/ping", nil)
+	c.Assert(err, check.IsNil)
+	req.Header.Add("Authorization", "Bearer "+arvadostest.ManagementToken)
+	resp, err := http.DefaultClient.Do(req)
+	c.Check(err, check.IsNil)
+	c.Check(resp.StatusCode, check.Equals, http.StatusNotFound)
+}

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list