3448: unit tests, bug fixes
authorTim Pierce <twp@curoverse.com>
Fri, 22 Aug 2014 17:52:33 +0000 (13:52 -0400)
committerTim Pierce <twp@curoverse.com>
Fri, 22 Aug 2014 17:52:33 +0000 (13:52 -0400)
commitc15f086483884fb21d04ceac0ea8bd96308051bd
treebc8f2c4216940d221e8dd9211bfa30831f0398df
parente386d20665a2bf9a59e314ad9efa5fddfffb8058
3448: unit tests, bug fixes

UnixVolume.Delete tests the return status of lockfile (oops, left out of
previous commit)

New unit/integration tests:

* TestPutTouch (volume_unix_test.go): issues a volume.Put for a block
  that already exists, and confirms that the mtime of the existing block
  is updated.

* TestPutBlockTouchFails (keepstore_test.go): issues PutBlock for a
  block that already exists but cannot be modified, confirms that the
  mtime on the old block is unchanged and that a new copy has been
  stored.

Added a volume.Mtime() method to return the block mtime, to assist in
testing.
services/keepstore/keepstore_test.go
services/keepstore/volume.go
services/keepstore/volume_unix.go
services/keepstore/volume_unix_test.go