[ARVADOS] updated: 42f5f3a29761ac9a943530157da376c798a4ac6d

Git user git at public.curoverse.com
Tue May 16 13:32:03 EDT 2017


Summary of changes:
 services/keepstore/mounts_test.go | 19 ++++++++++++++++---
 services/keepstore/volume_test.go |  4 ++++
 2 files changed, 20 insertions(+), 3 deletions(-)

       via  42f5f3a29761ac9a943530157da376c798a4ac6d (commit)
      from  9eff4af096f60b302abc9ad591f8b5fed45945a4 (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 42f5f3a29761ac9a943530157da376c798a4ac6d
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue May 16 13:31:27 2017 -0400

    11644: Test fields in /mounts response.

diff --git a/services/keepstore/mounts_test.go b/services/keepstore/mounts_test.go
index bfe298b..b44a08f 100644
--- a/services/keepstore/mounts_test.go
+++ b/services/keepstore/mounts_test.go
@@ -39,11 +39,24 @@ func (s *MountsSuite) TestMounts(c *check.C) {
 	resp := s.call("GET", "/mounts", "")
 	c.Check(resp.Code, check.Equals, http.StatusOK)
 	var mntList []struct {
-		UUID string
+		UUID        string
+		DeviceID    string
+		ReadOnly    bool
+		Replication int
+		Tier        int
 	}
 	err := json.Unmarshal(resp.Body.Bytes(), &mntList)
-	c.Check(err, check.IsNil)
-	c.Check(len(mntList), check.Equals, 2)
+	c.Assert(err, check.IsNil)
+	c.Assert(len(mntList), check.Equals, 2)
+	for _, m := range mntList {
+		c.Check(len(m.UUID), check.Equals, 27)
+		c.Check(m.UUID[:12], check.Equals, "zzzzz-ivpuk-")
+		c.Check(m.DeviceID, check.Equals, "mock-device-id")
+		c.Check(m.ReadOnly, check.Equals, false)
+		c.Check(m.Replication, check.Equals, 1)
+		c.Check(m.Tier, check.Equals, 1)
+	}
+	c.Check(mntList[0].UUID, check.Not(check.Equals), mntList[1].UUID)
 
 	// Bad auth
 	for _, tok := range []string{"", "xyzzy"} {
diff --git a/services/keepstore/volume_test.go b/services/keepstore/volume_test.go
index 931c10e..5893481 100644
--- a/services/keepstore/volume_test.go
+++ b/services/keepstore/volume_test.go
@@ -199,6 +199,10 @@ func (v *MockVolume) Trash(loc string) error {
 	return os.ErrNotExist
 }
 
+func (v *MockVolume) DeviceID() string {
+	return "mock-device-id"
+}
+
 func (v *MockVolume) Type() string {
 	return "Mock"
 }

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list