err := arv.Create("logs",
Dict{"log": Dict{"bogus_attr": "foo"}},
&getback)
- c.Assert(err, ErrorMatches, "API Server.*")
+ c.Assert(err, ErrorMatches, "arvados API server error: .*")
c.Assert(err, ErrorMatches, ".*unknown attribute: bogus_attr.*")
- c.Assert(err, FitsTypeOf, RemoteApiServerError{})
- c.Assert(err.(RemoteApiServerError).HttpStatusCode, Equals, 422)
+ c.Assert(err, FitsTypeOf, APIServerError{})
+ c.Assert(err.(APIServerError).HttpStatusCode, Equals, 422)
}
{
err := arv.Create("bogus",
Dict{"bogus": Dict{}},
&getback)
- c.Assert(err, ErrorMatches, "API Server.*")
+ c.Assert(err, ErrorMatches, "arvados API server error: .*")
c.Assert(err, ErrorMatches, ".*Path not found.*")
- c.Assert(err, FitsTypeOf, RemoteApiServerError{})
- c.Assert(err.(RemoteApiServerError).HttpStatusCode, Equals, 404)
+ c.Assert(err, FitsTypeOf, APIServerError{})
+ c.Assert(err.(APIServerError).HttpStatusCode, Equals, 404)
}
}
+
+func (s *ServerRequiredSuite) TestAPIDiscovery_Get_defaultCollectionReplication(c *C) {
+ arv, err := MakeArvadosClient()
+ value, err := arv.Discovery("defaultCollectionReplication")
+ c.Assert(err, IsNil)
+ c.Assert(value, NotNil)
+}
+
+func (s *ServerRequiredSuite) TestAPIDiscovery_Get_noSuchParameter(c *C) {
+ arv, err := MakeArvadosClient()
+ value, err := arv.Discovery("noSuchParameter")
+ c.Assert(err, NotNil)
+ c.Assert(value, IsNil)
+}