[ARVADOS] updated: 1.1.3-315-g396cb08

Git user git at public.curoverse.com
Tue Apr 3 17:53:55 EDT 2018


Summary of changes:
 sdk/go/arvados/collection_fs_test.go                 | 20 +++++++++++++++-----
 .../crunch-dispatch-slurm_test.go                    |  1 +
 services/keep-web/webdav.go                          |  2 +-
 services/keepproxy/keepproxy.go                      |  2 +-
 4 files changed, 18 insertions(+), 7 deletions(-)

       via  396cb080346a46a94508b2938ef6d916f4d1778f (commit)
      from  4ad120ed9f8977dff6ab333b4223f323d04a33d7 (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 396cb080346a46a94508b2938ef6d916f4d1778f
Author: Ward Vandewege <wvandewege at veritasgenetics.com>
Date:   Tue Apr 3 17:53:23 2018 -0400

    Fix one gofmt and more ineffassign warnings in our golang tests.
    
    No issue #
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <wvandewege at veritasgenetics.com>

diff --git a/sdk/go/arvados/collection_fs_test.go b/sdk/go/arvados/collection_fs_test.go
index 716a888..2604cef 100644
--- a/sdk/go/arvados/collection_fs_test.go
+++ b/sdk/go/arvados/collection_fs_test.go
@@ -267,7 +267,9 @@ func (s *CollectionFSSuite) TestReadWriteFile(c *check.C) {
 	c.Check(err, check.IsNil)
 	pos, err = f.Seek(0, io.SeekCurrent)
 	c.Check(pos, check.Equals, int64(18))
+	c.Check(err, check.IsNil)
 	pos, err = f.Seek(-18, io.SeekCurrent)
+	c.Check(pos, check.Equals, int64(0))
 	c.Check(err, check.IsNil)
 	n, err = io.ReadFull(f, buf)
 	c.Check(n, check.Equals, 18)
@@ -280,6 +282,7 @@ func (s *CollectionFSSuite) TestReadWriteFile(c *check.C) {
 
 	// truncate to current size
 	err = f.Truncate(18)
+	c.Check(err, check.IsNil)
 	f2.Seek(0, io.SeekStart)
 	buf2, err = ioutil.ReadAll(f2)
 	c.Check(err, check.IsNil)
@@ -313,6 +316,7 @@ func (s *CollectionFSSuite) TestReadWriteFile(c *check.C) {
 
 	// shrink to block/extent boundary
 	err = f.Truncate(32)
+	c.Check(err, check.IsNil)
 	f2.Seek(0, io.SeekStart)
 	buf2, err = ioutil.ReadAll(f2)
 	c.Check(err, check.IsNil)
@@ -321,6 +325,7 @@ func (s *CollectionFSSuite) TestReadWriteFile(c *check.C) {
 
 	// shrink to partial block/extent
 	err = f.Truncate(15)
+	c.Check(err, check.IsNil)
 	f2.Seek(0, io.SeekStart)
 	buf2, err = ioutil.ReadAll(f2)
 	c.Check(err, check.IsNil)
@@ -359,12 +364,14 @@ func (s *CollectionFSSuite) TestSeekSparse(c *check.C) {
 
 	checkSize := func(size int64) {
 		fi, err := f.Stat()
+		c.Assert(err, check.IsNil)
 		c.Check(fi.Size(), check.Equals, size)
 
 		f, err := fs.OpenFile("test", os.O_CREATE|os.O_RDWR, 0755)
 		c.Assert(err, check.IsNil)
 		defer f.Close()
 		fi, err = f.Stat()
+		c.Check(err, check.IsNil)
 		c.Check(fi.Size(), check.Equals, size)
 		pos, err := f.Seek(0, io.SeekEnd)
 		c.Check(err, check.IsNil)
@@ -786,10 +793,10 @@ func (s *CollectionFSSuite) TestPersistEmptyFiles(c *check.C) {
 
 	expect := map[string][]byte{
 		"0":                nil,
-		"00":               []byte{},
-		"one":              []byte{1},
+		"00":               {},
+		"one":              {1},
 		"dir/0":            nil,
-		"dir/two":          []byte{1, 2},
+		"dir/two":          {1, 2},
 		"dir/zero":         nil,
 		"dir/zerodir/zero": nil,
 		"zero/zero/zero":   nil,
@@ -812,10 +819,10 @@ func (s *CollectionFSSuite) TestPersistEmptyFiles(c *check.C) {
 	c.Assert(err, check.IsNil)
 
 	for name, data := range expect {
-		f, err := persisted.Open("bogus-" + name)
+		_, err = persisted.Open("bogus-" + name)
 		c.Check(err, check.NotNil)
 
-		f, err = persisted.Open(name)
+		f, err := persisted.Open(name)
 		c.Assert(err, check.IsNil)
 
 		if data == nil {
@@ -873,9 +880,11 @@ func (s *CollectionFSSuite) TestOpenFileFlags(c *check.C) {
 	c.Check(n, check.Equals, 1)
 	c.Check(buf[:1], check.DeepEquals, []byte{1})
 	pos, err = f.Seek(0, io.SeekCurrent)
+	c.Assert(err, check.IsNil)
 	c.Check(pos, check.Equals, int64(1))
 	f.Write([]byte{4, 5, 6})
 	pos, err = f.Seek(0, io.SeekCurrent)
+	c.Assert(err, check.IsNil)
 	c.Check(pos, check.Equals, int64(6))
 	f.Seek(0, io.SeekStart)
 	n, err = f.Read(buf)
@@ -893,6 +902,7 @@ func (s *CollectionFSSuite) TestOpenFileFlags(c *check.C) {
 	c.Check(pos, check.Equals, int64(3))
 	f.Write([]byte{7, 8, 9})
 	pos, err = f.Seek(0, io.SeekCurrent)
+	c.Check(err, check.IsNil)
 	c.Check(pos, check.Equals, int64(9))
 	f.Close()
 
diff --git a/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go b/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
index 4211026..499f6d5 100644
--- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
+++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
@@ -223,6 +223,7 @@ func (s *IntegrationSuite) TestSbatchFail(c *C) {
 		{"object_uuid", "=", container.UUID},
 		{"event_type", "=", "dispatch"},
 	}}, &ll)
+	c.Assert(err, IsNil)
 	c.Assert(len(ll.Items), Equals, 1)
 }
 
diff --git a/services/keep-web/webdav.go b/services/keep-web/webdav.go
index af83681..432c6af 100644
--- a/services/keep-web/webdav.go
+++ b/services/keep-web/webdav.go
@@ -47,7 +47,7 @@ type webdavFS struct {
 }
 
 func (fs *webdavFS) makeparents(name string) {
-	dir, name := path.Split(name)
+	dir, _ := path.Split(name)
 	if dir == "" || dir == "/" {
 		return
 	}
diff --git a/services/keepproxy/keepproxy.go b/services/keepproxy/keepproxy.go
index 0c0c08f..73fbefd 100644
--- a/services/keepproxy/keepproxy.go
+++ b/services/keepproxy/keepproxy.go
@@ -522,7 +522,7 @@ func (h *proxyHandler) Put(resp http.ResponseWriter, req *http.Request) {
 	// Now try to put the block through
 	if locatorIn == "" {
 		if bytes, err := ioutil.ReadAll(req.Body); err != nil {
-			err = errors.New(fmt.Sprintf("Error reading request body: %s", err))
+			_ = errors.New(fmt.Sprintf("Error reading request body: %s", err))
 			status = http.StatusInternalServerError
 			return
 		} else {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list