[ARVADOS] updated: 1.1.2-44-g1c35504
Git user
git at public.curoverse.com
Tue Jan 9 18:18:00 EST 2018
Summary of changes:
services/keepproxy/keepproxy_test.go | 12 ++++++------
services/keepstore/handler_test.go | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
via 1c355040b77161f02a2e351fe7ec32b1d1907ee8 (commit)
from 5e8428f48dd64e48b5dcfd13341c0a6bd44e4d74 (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 1c355040b77161f02a2e351fe7ec32b1d1907ee8
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Tue Jan 9 18:15:40 2018 -0500
Update tests to reflect gomux change.
If an unroutable request would have matched a route if the method had
been different, mux now responds 405 Method Not Allowed instead of
using NotFoundHandler.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/services/keepproxy/keepproxy_test.go b/services/keepproxy/keepproxy_test.go
index bb0e9bb..de72e74 100644
--- a/services/keepproxy/keepproxy_test.go
+++ b/services/keepproxy/keepproxy_test.go
@@ -355,7 +355,7 @@ func (s *ServerRequiredSuite) TestGetDisabled(c *C) {
_, _, err := kc.Ask(hash)
errNotFound, _ := err.(keepclient.ErrNotFound)
c.Check(errNotFound, NotNil)
- c.Assert(strings.Contains(err.Error(), "HTTP 400"), Equals, true)
+ c.Assert(err, ErrorMatches, `.*HTTP 405.*`)
c.Log("Ask 1")
}
@@ -371,7 +371,7 @@ func (s *ServerRequiredSuite) TestGetDisabled(c *C) {
blocklen, _, err := kc.Ask(hash)
errNotFound, _ := err.(keepclient.ErrNotFound)
c.Check(errNotFound, NotNil)
- c.Assert(strings.Contains(err.Error(), "HTTP 400"), Equals, true)
+ c.Assert(err, ErrorMatches, `.*HTTP 405.*`)
c.Check(blocklen, Equals, int64(0))
c.Log("Ask 2")
}
@@ -380,7 +380,7 @@ func (s *ServerRequiredSuite) TestGetDisabled(c *C) {
_, blocklen, _, err := kc.Get(hash)
errNotFound, _ := err.(keepclient.ErrNotFound)
c.Check(errNotFound, NotNil)
- c.Assert(strings.Contains(err.Error(), "HTTP 400"), Equals, true)
+ c.Assert(err, ErrorMatches, `.*HTTP 405.*`)
c.Check(blocklen, Equals, int64(0))
c.Log("Get")
}
@@ -596,14 +596,14 @@ func (s *ServerRequiredSuite) TestAskGetKeepProxyConnectionError(c *C) {
c.Check(err, NotNil)
errNotFound, _ := err.(*keepclient.ErrNotFound)
c.Check(errNotFound.Temporary(), Equals, true)
- c.Assert(strings.Contains(err.Error(), "connection refused"), Equals, true)
+ c.Assert(err, ErrorMatches, ".*connection refused.*")
// Get should result in temporary connection refused error
_, _, _, err = kc.Get(hash)
c.Check(err, NotNil)
errNotFound, _ = err.(*keepclient.ErrNotFound)
c.Check(errNotFound.Temporary(), Equals, true)
- c.Assert(strings.Contains(err.Error(), "connection refused"), Equals, true)
+ c.Assert(err, ErrorMatches, ".*connection refused.*")
}
func (s *NoKeepServerSuite) TestAskGetNoKeepServerError(c *C) {
@@ -644,5 +644,5 @@ func (s *ServerRequiredSuite) TestPing(c *C) {
resp := httptest.NewRecorder()
rtr.ServeHTTP(resp, req)
c.Check(resp.Code, Equals, 200)
- c.Assert(strings.Contains(resp.Body.String(), `{"health":"OK"}`), Equals, true)
+ c.Assert(resp.Body.String(), Matches, `{"health":"OK"}\n?`)
}
diff --git a/services/keepstore/handler_test.go b/services/keepstore/handler_test.go
index 4d042a7..f012ea3 100644
--- a/services/keepstore/handler_test.go
+++ b/services/keepstore/handler_test.go
@@ -1107,7 +1107,7 @@ func TestUntrashHandler(t *testing.T) {
response = IssueRequest(datamanagerWrongMethodReq)
ExpectStatusCode(t,
"Only PUT method is supported for untrash",
- http.StatusBadRequest,
+ http.StatusMethodNotAllowed,
response)
// datamanagerReq => StatusOK
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list