diff --git a/src/constants.js b/src/constants.js index 91eb6f46..d680f22a 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { - repoVersion: 6 + repoVersion: 7 } diff --git a/src/default-datastore.js b/src/default-datastore.js index 68b63461..3b28a0df 100644 --- a/src/default-datastore.js +++ b/src/default-datastore.js @@ -2,7 +2,6 @@ // Default configuration for the datastore spec in node.js module.exports = { - StorageMax: '10GB', StorageGCWatermark: 90, GCPeriod: '1h', BloomFilterSize: 0, diff --git a/test/repo-test.js b/test/repo-test.js index 8d7c2d0f..2287cc00 100644 --- a/test/repo-test.js +++ b/test/repo-test.js @@ -61,11 +61,31 @@ module.exports = (repo) => { }) }) + describe('spec', () => { + it('get spec', (done) => { + repo.spec.get((err) => { + expect(err).to.not.exist() + done() + }) + }) + + it('set spec', (done) => { + series([ + (cb) => repo.spec.set({ a: 'b' }, cb), + (cb) => repo.spec.get((err, spec) => { + if (err) return cb(err) + expect(spec).to.deep.equal({ a: 'b' }) + cb() + }) + ], done) + }) + }) + describe('version', () => { it('get version', (done) => { repo.version.get((err, version) => { expect(err).to.not.exist() - expect(version).to.equal(6) + expect(version).to.equal(7) done() }) }) @@ -78,7 +98,7 @@ module.exports = (repo) => { expect(version).to.equal(9000) cb() }, - (cb) => repo.version.set(6, cb) + (cb) => repo.version.set(7, cb) ], done) }) }) diff --git a/test/test-repo/datastore_spec b/test/test-repo/datastore_spec new file mode 100644 index 00000000..7bf9626c --- /dev/null +++ b/test/test-repo/datastore_spec @@ -0,0 +1 @@ +{"mounts":[{"mountpoint":"/blocks","path":"blocks","shardFunc":"/repo/flatfs/shard/v1/next-to-last/2","type":"flatfs"},{"mountpoint":"/","path":"datastore","type":"levelds"}],"type":"mount"} \ No newline at end of file diff --git a/test/test-repo/version b/test/test-repo/version index 1e8b3149..7f8f011e 100644 --- a/test/test-repo/version +++ b/test/test-repo/version @@ -1 +1 @@ -6 +7