[ARVADOS] updated: 2.1.0-618-ga55170ec1

Git user git at public.arvados.org
Thu Apr 1 15:06:37 UTC 2021


Summary of changes:
 services/keepstore/handler_test.go | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

       via  a55170ec158db3cbe2de54b15817e6a4fe597eda (commit)
      from  a77b278e24487974232543c56e5cef0304aeee01 (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 a55170ec158db3cbe2de54b15817e6a4fe597eda
Author: Tom Clegg <tom at curii.com>
Date:   Thu Apr 1 10:59:30 2021 -0400

    13382: Test storage class failure cases.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/services/keepstore/handler_test.go b/services/keepstore/handler_test.go
index a9d7330c0..db64449e4 100644
--- a/services/keepstore/handler_test.go
+++ b/services/keepstore/handler_test.go
@@ -1130,17 +1130,21 @@ func (s *HandlerSuite) TestPutStorageClasses(c *check.C) {
 		uri:         "/" + TestHash,
 		requestBody: TestBlock,
 	}
+
 	for _, trial := range []struct {
 		ask    string
 		expect string
 	}{
 		{"", ""},
 		{"default", "default=1"},
+		{" , default , default , ", "default=1"},
 		{"special", "extra=1, special=1"},
+		{"special, readonly", "extra=1, special=1"},
+		{"special, nonexistent", "extra=1, special=1"},
 		{"extra, special", "extra=1, special=1"},
 		{"default, special", "default=1, extra=1, special=1"},
 	} {
-		c.Logf("%#v", trial)
+		c.Logf("success case %#v", trial)
 		rt.storageClasses = trial.ask
 		resp := IssueRequest(s.handler, &rt)
 		if trial.expect == "" {
@@ -1150,6 +1154,19 @@ func (s *HandlerSuite) TestPutStorageClasses(c *check.C) {
 			c.Check(sortCommaSeparated(resp.Header().Get("X-Keep-Storage-Classes-Confirmed")), check.Equals, trial.expect)
 		}
 	}
+
+	for _, trial := range []struct {
+		ask string
+	}{
+		{"doesnotexist"},
+		{"doesnotexist, readonly"},
+		{"readonly"},
+	} {
+		c.Logf("failure case %#v", trial)
+		rt.storageClasses = trial.ask
+		resp := IssueRequest(s.handler, &rt)
+		c.Check(resp.Code, check.Equals, http.StatusServiceUnavailable)
+	}
 }
 
 func sortCommaSeparated(s string) string {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list