Add content test suite

Add content test suite with test for writer.
Update fs and metadata implementations to use test suite.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2017-07-10 11:37:39 -07:00
parent 442365248b
commit 938f3185bd
5 changed files with 337 additions and 9 deletions

View File

@@ -385,13 +385,14 @@ func (nw *namespacedWriter) commit(tx *bolt.Tx, size int64, expected digest.Dige
return err
}
timeEncoded, err := status.UpdatedAt.MarshalBinary()
timeEncoded, err := time.Now().UTC().MarshalBinary()
if err != nil {
return err
}
for _, v := range [][2][]byte{
{bucketKeyCreatedAt, timeEncoded},
{bucketKeyUpdatedAt, timeEncoded},
{bucketKeySize, sizeEncoded},
} {
if err := bkt.Put(v[0], v[1]); err != nil {