diff --git a/.gitignore b/.gitignore index 56dee6f6..405b5d68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +test/test-repo-for* + # Logs logs *.log @@ -26,3 +28,6 @@ build # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git node_modules + +dist +lib \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..33ff01fc --- /dev/null +++ b/.npmignore @@ -0,0 +1,30 @@ +test + +# Logs +logs +*.log + +coverage + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +build + +# Dependency directory +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git +node_modules diff --git a/.travis.yml b/.travis.yml index 59456ac8..301d60d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ before_install: - npm i -g npm # Workaround for a permissions issue with Travis virtual machine images script: + - npm run lint - npm test before_script: diff --git a/README.md b/README.md index 1edaf3e5..b4e95fe5 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ js-ipfs-repo [![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) [![Build Status](https://travis-ci.org/ipfs/js-ipfs-repo.svg)](https://travis-ci.org/ipfs/js-ipfs-repo) ![](https://img.shields.io/badge/coverage-90%25-yellow.svg?style=flat-square) [![Dependency Status](https://david-dm.org/diasdavid/js-peer-id.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-repo) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) [![dignified.js](https://img.shields.io/badge/uses-dignified.js-blue.svg?style=flat-square)](https://github.com/dignifiedquire/dignified.js) ## Description diff --git a/circle.yml b/circle.yml new file mode 100644 index 00000000..35f0f3a2 --- /dev/null +++ b/circle.yml @@ -0,0 +1,7 @@ +dependencies: + pre: + - npm i -g npm + +machine: + node: + version: stable diff --git a/karma.conf.js b/karma.conf.js deleted file mode 100644 index db63d9e5..00000000 --- a/karma.conf.js +++ /dev/null @@ -1,48 +0,0 @@ -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['mocha'], - files: [ - 'tests/browser-tests.js' - ], - preprocessors: { - 'tests/*': ['webpack'] - }, - webpack: { - resolve: { - extensions: ['', '.js'] - }, - externals: { - fs: '{}' - }, - node: { - Buffer: true - }, - module: { - loaders: [{ - test: /\.js$/, - exclude: /node_modules/, - loader: 'babel', - query: { - presets: ['es2015'] - } - }] - } - }, - webpackMiddleware: { - noInfo: true, - stats: { - colors: true - } - }, - reporters: ['spec'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: false, - browsers: process.env.TRAVIS ? ['Firefox', 'PhantomJS'] : ['Chrome', 'PhantomJS'], - captureTimeout: 60000, - singleRun: true, - concurrency: 1 - }) -} diff --git a/package.json b/package.json index d6a4ea2b..893e085f 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,13 @@ "description": "IPFS Repo implementation", "main": "src/index.js", "scripts": { - "test": "npm run test:node && npm run test:browser", - "test:node": "mocha tests/node-tests.js", - "test:browser": "karma start karma.conf.js", - "coverage": "istanbul cover --print both -- _mocha tests/node-tests.js", - "lint": "standard" + "test": "dignified-test", + "test:node": "dignified-test node", + "test:browser": "dignified-test browser", + "build": "dignified-build", + "coverage": "dignified-coverage", + "lint": "dignified-lint", + "release": "dignified-release" }, "repository": { "type": "git", @@ -24,34 +26,18 @@ "homepage": "https://github.com/ipfs/js-ipfs-repo", "devDependencies": { "async": "^1.5.2", - "babel-core": "^6.7.2", - "babel-loader": "^6.2.4", - "babel-polyfill": "^6.7.2", - "babel-preset-es2015": "^6.6.0", "bl": "^1.1.2", "bs58": "^3.0.0", "buffer-loader": "^0.0.1", "chai": "^3.5.0", + "dignified.js": "^1.0.0", "fs-blob-store": "^5.2.1", "idb-plus-blob-store": "^1.0.0", - "istanbul": "^0.4.2", - "karma": "^0.13.22", - "karma-chrome-launcher": "^0.2.2", - "karma-cli": "^0.1.2", - "karma-firefox-launcher": "^0.1.7", - "karma-mocha": "^0.2.2", - "karma-phantomjs-launcher": "^1.0.0", - "karma-spec-reporter": "0.0.26", - "karma-webpack": "^1.7.0", "local-storage-blob-store": "0.0.3", "lodash": "^4.6.1", - "mocha": "^2.4.5", "ncp": "^2.0.0", - "phantomjs-prebuilt": "^2.1.6", "pre-commit": "^1.1.2", - "rimraf": "^2.5.2", - "standard": "^6.0.8", - "webpack": "github:diasdavid/webpack#webpack-1" + "rimraf": "^2.5.2" }, "dependencies": { "bl": "^1.1.2", diff --git a/src/index.js b/src/index.js index d4af47f5..3c17a52f 100644 --- a/src/index.js +++ b/src/index.js @@ -2,16 +2,14 @@ const stores = require('./stores') -exports = module.exports = Repo - function Repo (repoPath, options) { if (!options) { throw new Error('missing options param') } if (!options.stores) { throw new Error('missing options.stores param') } // If options.stores is an abstract-blob-store instead of a map, use it for // all stores. - if (options.stores.prototype && options.stores.prototype.createWriteSteam) { - var store = options.stores + if (options.stores.prototype && options.stores.prototype.createWriteStream) { + const store = options.stores options.stores = { keys: store, config: store, @@ -70,3 +68,5 @@ function Repo (repoPath, options) { // .logs // .setUp(repoPath, options.stores.logs, this.locks) } + +exports = module.exports = Repo diff --git a/src/stores/datastore.js b/src/stores/datastore.js index 84dbabfa..83426c42 100644 --- a/src/stores/datastore.js +++ b/src/stores/datastore.js @@ -4,34 +4,50 @@ const PREFIX_LENGTH = 8 exports = module.exports +function multihashToPath (multihash, extension) { + extension = extension || 'data' + const filename = `${multihash.toString('hex')}.${extension}` + const folder = filename.slice(0, PREFIX_LENGTH) + const path = folder + '/' + filename + + return path +} + exports.setUp = (basePath, blobStore, locks) => { const store = blobStore(basePath + '/blocks') return { - createReadStream: (multihash) => { - const path = multihashToPath(multihash) + createReadStream: (multihash, extension) => { + const path = multihashToPath(multihash, extension) return store.createReadStream(path) }, - createWriteStream: (multihash, cb) => { - const path = multihashToPath(multihash) + createWriteStream: (multihash, extension, cb) => { + if (typeof extension === 'function') { + cb = extension + extension = undefined + } + + const path = multihashToPath(multihash, extension) return store.createWriteStream(path, cb) }, - exists: (multihash, cb) => { - const path = multihashToPath(multihash) + exists: (multihash, extension, cb) => { + if (typeof extension === 'function') { + cb = extension + extension = undefined + } + + const path = multihashToPath(multihash, extension) return store.exists(path, cb) }, - remove: (multihash, cb) => { - const path = multihashToPath(multihash) + remove: (multihash, extension, cb) => { + if (typeof extension === 'function') { + cb = extension + extension = undefined + } + + const path = multihashToPath(multihash, extension) return store.remove(path, cb) } } } - -function multihashToPath (multihash) { - const filename = multihash.toString('hex') + '.data' - const folder = filename.slice(0, PREFIX_LENGTH) - const path = folder + '/' + filename - - return path -} diff --git a/src/stores/locks.js b/src/stores/locks.js index 52a23a86..6830408a 100644 --- a/src/stores/locks.js +++ b/src/stores/locks.js @@ -8,7 +8,14 @@ exports.setUp = (basePath, blobStore) => { return { lock: function (cb) { - store.exists(lockFile, doesExist) + function createLock () { + store + .createWriteStream(lockFile) + .on('finish', () => { + cb() + }) + .end() + } function doesExist (err, exists) { if (err) { @@ -24,14 +31,7 @@ exports.setUp = (basePath, blobStore) => { createLock() } - function createLock () { - store - .createWriteStream(lockFile) - .on('finish', () => { - cb() - }) - .end() - } + store.exists(lockFile, doesExist) }, unlock: (cb) => { store.remove(lockFile, (err) => { diff --git a/tests/browser-tests.js b/test/browser.js similarity index 97% rename from tests/browser-tests.js rename to test/browser.js index 251d0673..f870e875 100644 --- a/tests/browser-tests.js +++ b/test/browser.js @@ -2,7 +2,6 @@ 'use strict' -require('babel-polyfill') const async = require('async') const store = require('idb-plus-blob-store') const tests = require('./repo-test') @@ -22,7 +21,7 @@ idb.deleteDatabase('ipfs/blocks') // TODO use arrow funtions again when https://github.com/webpack/webpack/issues/1944 is fixed describe('IPFS Repo Tests on the Browser', function () { before(function (done) { - var repoData = [] + const repoData = [] repoContext.keys().forEach(function (key) { repoData.push({ key: key.replace('./', ''), diff --git a/tests/node-tests.js b/test/node.js similarity index 65% rename from tests/node-tests.js rename to test/node.js index 8132f130..d7b28f8e 100644 --- a/tests/node-tests.js +++ b/test/node.js @@ -12,7 +12,7 @@ const IPFSRepo = require('../src') describe('IPFS Repo Tests on on Node.js', () => { const testRepoPath = path.join(__dirname, 'test-repo') const date = Date.now().toString() - const repoPath = testRepoPath + date + const repoPath = testRepoPath + '-for-' + date before((done) => { ncp(testRepoPath, repoPath, (err) => { @@ -29,17 +29,6 @@ describe('IPFS Repo Tests on on Node.js', () => { }) const fs = require('fs-blob-store') - const options = { - stores: { - keys: fs, - config: fs, - datastore: fs, - // datastoreLegacy: needs https://github.com/ipfs/js-ipfs-repo/issues/6#issuecomment-164650642 - logs: fs, - locks: fs, - version: fs - } - } - const repo = new IPFSRepo(repoPath, options) + const repo = new IPFSRepo(repoPath, {stores: fs}) require('./repo-test')(repo) }) diff --git a/tests/repo-test.js b/test/repo-test.js similarity index 68% rename from tests/repo-test.js rename to test/repo-test.js index 9a38ede5..279190de 100644 --- a/tests/repo-test.js +++ b/test/repo-test.js @@ -6,12 +6,11 @@ const expect = require('chai').expect const base58 = require('bs58') const bl = require('bl') const fs = require('fs') +const join = require('path').join -const isNode = !global.window +const fileA = fs.readFileSync(join(__dirname, 'test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data')) -const fileA = isNode - ? fs.readFileSync(process.cwd() + '/tests/test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data') - : require('buffer!./test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data') +const fileAExt = fs.readFileSync(join(__dirname, 'test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.ext')) module.exports = function (repo) { describe('IPFS Repo Tests', function () { @@ -109,6 +108,7 @@ module.exports = function (repo) { describe('datastore', function () { const baseFileHash = 'QmVtU7ths96fMgZ8YSZAbKghyieq7AjxNdcqyVzxTt3qVe' + const baseExtFileHash = 'QmVtU7ths96fMgZ8YSZAbKghyieq7AjxNdcqyVzxTt3qVe' it('reads block', function (done) { const buf = new Buffer(base58.decode(baseFileHash)) @@ -120,6 +120,16 @@ module.exports = function (repo) { })) }) + it('reads block, with custom extension', function (done) { + const buf = new Buffer(base58.decode(baseFileHash)) + repo.datastore.createReadStream(buf, 'ext') + .pipe(bl((err, data) => { + expect(err).to.not.exist + expect(data.equals(fileAExt)).to.equal(true) + done() + })) + }) + it('write a block', function (done) { const rnd = 'QmVtU7ths96fMgZ8YSZAbKghyieq7AjxNdcqyVtesthash' const mh = new Buffer(base58.decode(rnd)) @@ -132,6 +142,18 @@ module.exports = function (repo) { }).end(data) }) + it('write a block with custom extension', function (done) { + const rnd = 'QmVtU7ths96fMgZ8YSZAbKghyieq7AjxNdcqyVtesthash' + const mh = new Buffer(base58.decode(rnd)) + const data = new Buffer('Oh the data') + + repo.datastore.createWriteStream(mh, 'ext', (err, metadata) => { + expect(err).to.not.exist + expect(metadata.key).to.equal('12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07605f55537ce990.ext') + done() + }).end(data) + }) + it('block exists', function (done) { const buf = new Buffer(base58.decode(baseFileHash)) @@ -142,6 +164,16 @@ module.exports = function (repo) { }) }) + it('block exists, with custom extension', function (done) { + const buf = new Buffer(base58.decode(baseExtFileHash)) + + repo.datastore.exists(buf, 'ext', (err, exists) => { + expect(err).to.not.exist + expect(exists).to.equal(true) + done() + }) + }) + it('check for non existent block', function (done) { const buf = new Buffer('random buffer') @@ -163,6 +195,18 @@ module.exports = function (repo) { }) }) }) + + it('remove a block, with custom extension', function (done) { + const buf = new Buffer(base58.decode(baseExtFileHash)) + repo.datastore.remove(buf, 'ext', (err) => { + expect(err).to.not.exist + repo.datastore.exists(buf, 'ext', (err, exists) => { + expect(err).to.not.exist + expect(exists).to.equal(false) + done() + }) + }) + }) }) describe('datastore-legacy', () => {}) diff --git a/tests/test-repo/blocks/1220120f/1220120f6af601d46e10b2d2e11ed71c55d25f3042c22501e41d1246e7a1e9d3d8ec.data b/test/test-repo/blocks/1220120f/1220120f6af601d46e10b2d2e11ed71c55d25f3042c22501e41d1246e7a1e9d3d8ec.data similarity index 100% rename from tests/test-repo/blocks/1220120f/1220120f6af601d46e10b2d2e11ed71c55d25f3042c22501e41d1246e7a1e9d3d8ec.data rename to test/test-repo/blocks/1220120f/1220120f6af601d46e10b2d2e11ed71c55d25f3042c22501e41d1246e7a1e9d3d8ec.data diff --git a/tests/test-repo/blocks/122031d6/122031d6da265092f1b03fec969243fdcf095c1d219356cdf538ffce705a52d5738d.data b/test/test-repo/blocks/122031d6/122031d6da265092f1b03fec969243fdcf095c1d219356cdf538ffce705a52d5738d.data similarity index 100% rename from tests/test-repo/blocks/122031d6/122031d6da265092f1b03fec969243fdcf095c1d219356cdf538ffce705a52d5738d.data rename to test/test-repo/blocks/122031d6/122031d6da265092f1b03fec969243fdcf095c1d219356cdf538ffce705a52d5738d.data diff --git a/tests/test-repo/blocks/122031e7/122031e7a41c15d03feb8cd793c3348ea3b310512d7767a9abfbd7a928a85e977173.data b/test/test-repo/blocks/122031e7/122031e7a41c15d03feb8cd793c3348ea3b310512d7767a9abfbd7a928a85e977173.data similarity index 100% rename from tests/test-repo/blocks/122031e7/122031e7a41c15d03feb8cd793c3348ea3b310512d7767a9abfbd7a928a85e977173.data rename to test/test-repo/blocks/122031e7/122031e7a41c15d03feb8cd793c3348ea3b310512d7767a9abfbd7a928a85e977173.data diff --git a/tests/test-repo/blocks/12203628/12203628a4a19525dd84bbbffe132ec0b0d3be3528fbbcc814feb7f2fbf71ca06162.data b/test/test-repo/blocks/12203628/12203628a4a19525dd84bbbffe132ec0b0d3be3528fbbcc814feb7f2fbf71ca06162.data similarity index 100% rename from tests/test-repo/blocks/12203628/12203628a4a19525dd84bbbffe132ec0b0d3be3528fbbcc814feb7f2fbf71ca06162.data rename to test/test-repo/blocks/12203628/12203628a4a19525dd84bbbffe132ec0b0d3be3528fbbcc814feb7f2fbf71ca06162.data diff --git a/tests/test-repo/blocks/12204a5a/12204a5a95586f52e25811cf214677160e64383755a8c5163ba3c053c3b65777ed16.data b/test/test-repo/blocks/12204a5a/12204a5a95586f52e25811cf214677160e64383755a8c5163ba3c053c3b65777ed16.data similarity index 100% rename from tests/test-repo/blocks/12204a5a/12204a5a95586f52e25811cf214677160e64383755a8c5163ba3c053c3b65777ed16.data rename to test/test-repo/blocks/12204a5a/12204a5a95586f52e25811cf214677160e64383755a8c5163ba3c053c3b65777ed16.data diff --git a/tests/test-repo/blocks/12205200/12205200cc6b6f79e1588480d9f9016ccadfda3d8bc7d2f8cdf302aa51dae8dae9da.data b/test/test-repo/blocks/12205200/12205200cc6b6f79e1588480d9f9016ccadfda3d8bc7d2f8cdf302aa51dae8dae9da.data similarity index 100% rename from tests/test-repo/blocks/12205200/12205200cc6b6f79e1588480d9f9016ccadfda3d8bc7d2f8cdf302aa51dae8dae9da.data rename to test/test-repo/blocks/12205200/12205200cc6b6f79e1588480d9f9016ccadfda3d8bc7d2f8cdf302aa51dae8dae9da.data diff --git a/tests/test-repo/blocks/122052c6/122052c63c7775396b3f82c639977a7223c2d96a9f70b5fd8b1d513f8c5b69dcaed4.data b/test/test-repo/blocks/122052c6/122052c63c7775396b3f82c639977a7223c2d96a9f70b5fd8b1d513f8c5b69dcaed4.data similarity index 100% rename from tests/test-repo/blocks/122052c6/122052c63c7775396b3f82c639977a7223c2d96a9f70b5fd8b1d513f8c5b69dcaed4.data rename to test/test-repo/blocks/122052c6/122052c63c7775396b3f82c639977a7223c2d96a9f70b5fd8b1d513f8c5b69dcaed4.data diff --git a/tests/test-repo/blocks/12205994/122059948439065f29619ef41280cbb932be52c56d99c5966b65e0111239f098bbef.data b/test/test-repo/blocks/12205994/122059948439065f29619ef41280cbb932be52c56d99c5966b65e0111239f098bbef.data similarity index 100% rename from tests/test-repo/blocks/12205994/122059948439065f29619ef41280cbb932be52c56d99c5966b65e0111239f098bbef.data rename to test/test-repo/blocks/12205994/122059948439065f29619ef41280cbb932be52c56d99c5966b65e0111239f098bbef.data diff --git a/tests/test-repo/blocks/122062ce/122062ce1f2c91a13a97b596e873b5a3346a644605d7614dca53cd3a59f7385a8abb.data b/test/test-repo/blocks/122062ce/122062ce1f2c91a13a97b596e873b5a3346a644605d7614dca53cd3a59f7385a8abb.data similarity index 100% rename from tests/test-repo/blocks/122062ce/122062ce1f2c91a13a97b596e873b5a3346a644605d7614dca53cd3a59f7385a8abb.data rename to test/test-repo/blocks/122062ce/122062ce1f2c91a13a97b596e873b5a3346a644605d7614dca53cd3a59f7385a8abb.data diff --git a/tests/test-repo/blocks/12206781/122067817186b8ff365c758f387e3ae7f28fa9367ee167c312e6d65a2e02e81ab815.data b/test/test-repo/blocks/12206781/122067817186b8ff365c758f387e3ae7f28fa9367ee167c312e6d65a2e02e81ab815.data similarity index 100% rename from tests/test-repo/blocks/12206781/122067817186b8ff365c758f387e3ae7f28fa9367ee167c312e6d65a2e02e81ab815.data rename to test/test-repo/blocks/12206781/122067817186b8ff365c758f387e3ae7f28fa9367ee167c312e6d65a2e02e81ab815.data diff --git a/tests/test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data b/test/test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data similarity index 100% rename from tests/test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data rename to test/test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data diff --git a/test/test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.ext b/test/test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.ext new file mode 100644 index 00000000..74de75af Binary files /dev/null and b/test/test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.ext differ diff --git a/tests/test-repo/blocks/1220709b/1220709b2dcc5f6a90ad64d6fe3a5d202a72b057d1c7f2e682d0776a5363e2cca974.data b/test/test-repo/blocks/1220709b/1220709b2dcc5f6a90ad64d6fe3a5d202a72b057d1c7f2e682d0776a5363e2cca974.data similarity index 100% rename from tests/test-repo/blocks/1220709b/1220709b2dcc5f6a90ad64d6fe3a5d202a72b057d1c7f2e682d0776a5363e2cca974.data rename to test/test-repo/blocks/1220709b/1220709b2dcc5f6a90ad64d6fe3a5d202a72b057d1c7f2e682d0776a5363e2cca974.data diff --git a/tests/test-repo/blocks/12207fb8/12207fb898b5d7be46d85feb75d894e16cfa9a7ae5533f8e997cdab2ebadd7506340.data b/test/test-repo/blocks/12207fb8/12207fb898b5d7be46d85feb75d894e16cfa9a7ae5533f8e997cdab2ebadd7506340.data similarity index 100% rename from tests/test-repo/blocks/12207fb8/12207fb898b5d7be46d85feb75d894e16cfa9a7ae5533f8e997cdab2ebadd7506340.data rename to test/test-repo/blocks/12207fb8/12207fb898b5d7be46d85feb75d894e16cfa9a7ae5533f8e997cdab2ebadd7506340.data diff --git a/tests/test-repo/blocks/12208b87/12208b872ca4ee517608331696dd6b3e5cf3497a7845ee8f94456ccf4d1d2f6602b5.data b/test/test-repo/blocks/12208b87/12208b872ca4ee517608331696dd6b3e5cf3497a7845ee8f94456ccf4d1d2f6602b5.data similarity index 100% rename from tests/test-repo/blocks/12208b87/12208b872ca4ee517608331696dd6b3e5cf3497a7845ee8f94456ccf4d1d2f6602b5.data rename to test/test-repo/blocks/12208b87/12208b872ca4ee517608331696dd6b3e5cf3497a7845ee8f94456ccf4d1d2f6602b5.data diff --git a/tests/test-repo/blocks/122090c0/122090c07a7795c1193510a696d1fdfc0f1e4947cff8e422610996e609dbcb976598.data b/test/test-repo/blocks/122090c0/122090c07a7795c1193510a696d1fdfc0f1e4947cff8e422610996e609dbcb976598.data similarity index 100% rename from tests/test-repo/blocks/122090c0/122090c07a7795c1193510a696d1fdfc0f1e4947cff8e422610996e609dbcb976598.data rename to test/test-repo/blocks/122090c0/122090c07a7795c1193510a696d1fdfc0f1e4947cff8e422610996e609dbcb976598.data diff --git a/tests/test-repo/blocks/1220929a/1220929a303c39da8a0b67c09697462f687a00c638bcb580feae06452e0c1f20b4.data b/test/test-repo/blocks/1220929a/1220929a303c39da8a0b67c09697462f687a00c638bcb580feae06452e0c1f20b4.data similarity index 100% rename from tests/test-repo/blocks/1220929a/1220929a303c39da8a0b67c09697462f687a00c638bcb580feae06452e0c1f20b4.data rename to test/test-repo/blocks/1220929a/1220929a303c39da8a0b67c09697462f687a00c638bcb580feae06452e0c1f20b4.data diff --git a/tests/test-repo/blocks/1220933b/1220933b41d37fd4508cdff45930dff56baef91c7dc345e73d049ab570abe10dfbb9.data b/test/test-repo/blocks/1220933b/1220933b41d37fd4508cdff45930dff56baef91c7dc345e73d049ab570abe10dfbb9.data similarity index 100% rename from tests/test-repo/blocks/1220933b/1220933b41d37fd4508cdff45930dff56baef91c7dc345e73d049ab570abe10dfbb9.data rename to test/test-repo/blocks/1220933b/1220933b41d37fd4508cdff45930dff56baef91c7dc345e73d049ab570abe10dfbb9.data diff --git a/tests/test-repo/blocks/1220a52c/1220a52c3602030cb912edfe4de97002fdadf9d45666c3be122a2efb5db93c1d5fa6.data b/test/test-repo/blocks/1220a52c/1220a52c3602030cb912edfe4de97002fdadf9d45666c3be122a2efb5db93c1d5fa6.data similarity index 100% rename from tests/test-repo/blocks/1220a52c/1220a52c3602030cb912edfe4de97002fdadf9d45666c3be122a2efb5db93c1d5fa6.data rename to test/test-repo/blocks/1220a52c/1220a52c3602030cb912edfe4de97002fdadf9d45666c3be122a2efb5db93c1d5fa6.data diff --git a/tests/test-repo/blocks/1220c0fc/1220c0fc6b49543d7bf04e83d2a5a7cbe72a83e80f9c7bca1abcaa42298a57a33ff5.data b/test/test-repo/blocks/1220c0fc/1220c0fc6b49543d7bf04e83d2a5a7cbe72a83e80f9c7bca1abcaa42298a57a33ff5.data similarity index 100% rename from tests/test-repo/blocks/1220c0fc/1220c0fc6b49543d7bf04e83d2a5a7cbe72a83e80f9c7bca1abcaa42298a57a33ff5.data rename to test/test-repo/blocks/1220c0fc/1220c0fc6b49543d7bf04e83d2a5a7cbe72a83e80f9c7bca1abcaa42298a57a33ff5.data diff --git a/tests/test-repo/blocks/1220e3b0/1220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.data b/test/test-repo/blocks/1220e3b0/1220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.data similarity index 100% rename from tests/test-repo/blocks/1220e3b0/1220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.data rename to test/test-repo/blocks/1220e3b0/1220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.data diff --git a/tests/test-repo/blocks/1220e605/1220e605408ac3f78113ac9a7fd486441317afc9f967abe2aa05e7c641f7bbe98a37.data b/test/test-repo/blocks/1220e605/1220e605408ac3f78113ac9a7fd486441317afc9f967abe2aa05e7c641f7bbe98a37.data similarity index 100% rename from tests/test-repo/blocks/1220e605/1220e605408ac3f78113ac9a7fd486441317afc9f967abe2aa05e7c641f7bbe98a37.data rename to test/test-repo/blocks/1220e605/1220e605408ac3f78113ac9a7fd486441317afc9f967abe2aa05e7c641f7bbe98a37.data diff --git a/tests/test-repo/blocks/1220e6a0/1220e6a045864ff8569e43e4866c0af807def07b0db2f018808620eb30b980e94011.data b/test/test-repo/blocks/1220e6a0/1220e6a045864ff8569e43e4866c0af807def07b0db2f018808620eb30b980e94011.data similarity index 100% rename from tests/test-repo/blocks/1220e6a0/1220e6a045864ff8569e43e4866c0af807def07b0db2f018808620eb30b980e94011.data rename to test/test-repo/blocks/1220e6a0/1220e6a045864ff8569e43e4866c0af807def07b0db2f018808620eb30b980e94011.data diff --git a/tests/test-repo/blocks/1220ec5b/1220ec5b533a3218991f4377b8b8c2538b95dd29d31eac6433af0fb6fcd83dd80778.data b/test/test-repo/blocks/1220ec5b/1220ec5b533a3218991f4377b8b8c2538b95dd29d31eac6433af0fb6fcd83dd80778.data similarity index 100% rename from tests/test-repo/blocks/1220ec5b/1220ec5b533a3218991f4377b8b8c2538b95dd29d31eac6433af0fb6fcd83dd80778.data rename to test/test-repo/blocks/1220ec5b/1220ec5b533a3218991f4377b8b8c2538b95dd29d31eac6433af0fb6fcd83dd80778.data diff --git a/tests/test-repo/config b/test/test-repo/config similarity index 100% rename from tests/test-repo/config rename to test/test-repo/config diff --git a/tests/test-repo/datastore/000002.ldb b/test/test-repo/datastore/000002.ldb similarity index 100% rename from tests/test-repo/datastore/000002.ldb rename to test/test-repo/datastore/000002.ldb diff --git a/tests/test-repo/datastore/000005.ldb b/test/test-repo/datastore/000005.ldb similarity index 100% rename from tests/test-repo/datastore/000005.ldb rename to test/test-repo/datastore/000005.ldb diff --git a/tests/test-repo/datastore/CURRENT b/test/test-repo/datastore/CURRENT similarity index 100% rename from tests/test-repo/datastore/CURRENT rename to test/test-repo/datastore/CURRENT diff --git a/tests/test-repo/datastore/LOCK b/test/test-repo/datastore/LOCK similarity index 100% rename from tests/test-repo/datastore/LOCK rename to test/test-repo/datastore/LOCK diff --git a/tests/test-repo/datastore/LOG b/test/test-repo/datastore/LOG similarity index 100% rename from tests/test-repo/datastore/LOG rename to test/test-repo/datastore/LOG diff --git a/tests/test-repo/datastore/LOG.old b/test/test-repo/datastore/LOG.old similarity index 100% rename from tests/test-repo/datastore/LOG.old rename to test/test-repo/datastore/LOG.old diff --git a/tests/test-repo/datastore/MANIFEST-000007 b/test/test-repo/datastore/MANIFEST-000007 similarity index 100% rename from tests/test-repo/datastore/MANIFEST-000007 rename to test/test-repo/datastore/MANIFEST-000007 diff --git a/tests/test-repo/version b/test/test-repo/version similarity index 100% rename from tests/test-repo/version rename to test/test-repo/version