[ARVADOS] updated: 493e39c8a1ab3caf10ae1c03e16d82f4b77e4a6a
git at public.curoverse.com
git at public.curoverse.com
Tue Aug 11 17:27:22 EDT 2015
Summary of changes:
sdk/go/arvadosclient/arvadosclient_test.go | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
via 493e39c8a1ab3caf10ae1c03e16d82f4b77e4a6a (commit)
from 094d247c7aaddbcd0a512887c6ce115558d14f72 (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 493e39c8a1ab3caf10ae1c03e16d82f4b77e4a6a
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Aug 11 17:27:07 2015 -0400
5824: Test invalid argument vs. 404.
diff --git a/sdk/go/arvadosclient/arvadosclient_test.go b/sdk/go/arvadosclient/arvadosclient_test.go
index acdf091..d35f6da 100644
--- a/sdk/go/arvadosclient/arvadosclient_test.go
+++ b/sdk/go/arvadosclient/arvadosclient_test.go
@@ -47,13 +47,36 @@ func (s *ServerRequiredSuite) TestMakeArvadosClientInsecure(c *C) {
c.Check(kc.Client.Transport.(*http.Transport).TLSClientConfig.InsecureSkipVerify, Equals, true)
}
-func (s *ServerRequiredSuite) TestGetEmptyUUID(c *C) {
+func (s *ServerRequiredSuite) TestGetInvalidUUID(c *C) {
arv, err := MakeArvadosClient()
getback := make(Dict)
err = arv.Get("collections", "", nil, &getback)
c.Assert(err, Equals, ErrInvalidArgument)
c.Assert(len(getback), Equals, 0)
+
+ err = arv.Get("collections", "zebra-moose-unicorn", nil, &getback)
+ c.Assert(err, Equals, ErrInvalidArgument)
+ c.Assert(len(getback), Equals, 0)
+
+ err = arv.Get("collections", "acbd18db4cc2f85cedef654fccc4a4d8", nil, &getback)
+ c.Assert(err, Equals, ErrInvalidArgument)
+ c.Assert(len(getback), Equals, 0)
+}
+
+func (s *ServerRequiredSuite) TestGetValidUUID(c *C) {
+ arv, err := MakeArvadosClient()
+
+ getback := make(Dict)
+ err = arv.Get("collections", "zzzzz-4zz18-abcdeabcdeabcde", nil, &getback)
+ c.Assert(err, FitsTypeOf, APIServerError{})
+ c.Assert(err.(APIServerError).HttpStatusCode, Equals, http.StatusNotFound)
+ c.Assert(len(getback), Equals, 0)
+
+ err = arv.Get("collections", "acbd18db4cc2f85cedef654fccc4a4d8+3", nil, &getback)
+ c.Assert(err, FitsTypeOf, APIServerError{})
+ c.Assert(err.(APIServerError).HttpStatusCode, Equals, http.StatusNotFound)
+ c.Assert(len(getback), Equals, 0)
}
func (s *ServerRequiredSuite) TestInvalidResourceType(c *C) {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list