Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
Merge be92bc5 into 7499057
Browse files Browse the repository at this point in the history
  • Loading branch information
littleskunk committed Jul 19, 2017
2 parents 7499057 + be92bc5 commit a20808d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ exports.validateAllocation = function(conf, callback) {
}

if (allocatedSpace > free + usedSpaceBytes) {
return callback(new Error('Invalid storage size'));
return callback(new Error('Invalid storage size: '+
-(free + usedSpaceBytes - allocatedSpace) +' bytes missing'));
}

return callback(null);
Expand Down
3 changes: 2 additions & 1 deletion test/utils.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ describe('module:utils', function() {
}, function(err) {
getFreeSpace.restore();
getDirectorySize.restore();
expect(err.message).to.equal('Invalid storage size');
expect(err.message).to.equal(
'Invalid storage size: 1024 bytes missing');
done();
});
});
Expand Down

0 comments on commit a20808d

Please sign in to comment.