[ARVADOS] updated: da037c1372879cb0ebc221c42ebdb86af669295b

Git user git at public.curoverse.com
Fri Jul 21 13:54:08 EDT 2017


Summary of changes:
 sdk/go/health/handler.go      |  2 +-
 sdk/go/health/handler_test.go | 18 +++++++++++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

       via  da037c1372879cb0ebc221c42ebdb86af669295b (commit)
       via  fc2705f7015381705bd06e7f9578e4ba3fac682a (commit)
       via  c834c3463440d07ad528241d7910682cb374103d (commit)
      from  0e0dc3c8ebf442a35c41816fed42fdddb53aed53 (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 da037c1372879cb0ebc221c42ebdb86af669295b
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Jul 21 13:53:32 2017 -0400

    11906: Clarify "zero value" test.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curoverse.com>

diff --git a/sdk/go/health/handler_test.go b/sdk/go/health/handler_test.go
index 3e1b027..c9f6a0b 100644
--- a/sdk/go/health/handler_test.go
+++ b/sdk/go/health/handler_test.go
@@ -96,10 +96,14 @@ func (s *Suite) TestPingOverride(c *check.C) {
 	s.checkUnhealthy(c, resp)
 }
 
-func (s *Suite) TestZeroValue(c *check.C) {
+func (s *Suite) TestZeroValueIsDisabled(c *check.C) {
 	resp := httptest.NewRecorder()
 	(&Handler{}).ServeHTTP(resp, s.request("/ping", goodToken))
 	c.Check(resp.Code, check.Equals, http.StatusNotFound)
+
+	resp = httptest.NewRecorder()
+	(&Handler{}).ServeHTTP(resp, s.request("/ping", ""))
+	c.Check(resp.Code, check.Equals, http.StatusNotFound)
 }
 
 func (s *Suite) request(path, token string) *http.Request {

commit fc2705f7015381705bd06e7f9578e4ba3fac682a
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Jul 21 13:49:22 2017 -0400

    11906: Test 404 cases.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curoverse.com>

diff --git a/sdk/go/health/handler_test.go b/sdk/go/health/handler_test.go
index 055e2c3..3e1b027 100644
--- a/sdk/go/health/handler_test.go
+++ b/sdk/go/health/handler_test.go
@@ -58,6 +58,18 @@ func (s *Suite) TestPassFailRefuse(c *check.C) {
 	resp = httptest.NewRecorder()
 	h.ServeHTTP(resp, s.request("/_health/miracle", ""))
 	c.Check(resp.Code, check.Equals, http.StatusUnauthorized)
+
+	resp = httptest.NewRecorder()
+	h.ServeHTTP(resp, s.request("/_health/theperthcountyconspiracy", ""))
+	c.Check(resp.Code, check.Equals, http.StatusNotFound)
+
+	resp = httptest.NewRecorder()
+	h.ServeHTTP(resp, s.request("/x/miracle", ""))
+	c.Check(resp.Code, check.Equals, http.StatusNotFound)
+
+	resp = httptest.NewRecorder()
+	h.ServeHTTP(resp, s.request("/miracle", ""))
+	c.Check(resp.Code, check.Equals, http.StatusNotFound)
 }
 
 func (s *Suite) TestPingOverride(c *check.C) {

commit c834c3463440d07ad528241d7910682cb374103d
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Jul 21 13:49:04 2017 -0400

    1906: Fix up doc comment.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curoverse.com>

diff --git a/sdk/go/health/handler.go b/sdk/go/health/handler.go
index aef72c2..f19511e 100644
--- a/sdk/go/health/handler.go
+++ b/sdk/go/health/handler.go
@@ -37,7 +37,7 @@ type Handler struct {
 
 	// Map of URI paths to health-check Func. The prefix is
 	// omitted: Routes["foo"] is the health check invoked by a
-	// request to "/_health/foo".
+	// request to "{Prefix}/foo".
 	//
 	// If "ping" is not listed here, it will be added
 	// automatically and will always return a "healthy" response.

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list