From 1a2504dab26546ed8d28be0fde62165952bb81d4 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Sat, 29 Sep 2018 22:21:13 +0100 Subject: [PATCH] chore: update js-ipfs version --- package.json | 2 +- test/repo.js | 30 +++++++++++++++++++----------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 35212ddd..63e2a253 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "form-data": "^2.3.2", "go-ipfs-dep": "~0.4.17", "hat": "0.0.3", - "ipfs": "~0.32.0", + "ipfs": "~0.32.3", "ipfs-api": "^24.0.0", "ipfsd-ctl": "~0.39.1", "ipfs-unixfs": "~0.1.15", diff --git a/test/repo.js b/test/repo.js index d267412e..47123203 100644 --- a/test/repo.js +++ b/test/repo.js @@ -77,7 +77,7 @@ describe('repo', () => { }) it('read repo: js -> go', function (done) { - this.timeout(50 * 1000) + this.timeout(80 * 1000) const dir = path.join(os.tmpdir(), hat()) const data = crypto.randomBytes(1024 * 5) @@ -88,26 +88,34 @@ describe('repo', () => { series([ (cb) => jsDf.spawn({ repoPath: dir, + disposable: false, initOptions: { bits: 512 } - }, cb), - (node, cb) => { + }, (err, node) => { + expect(err).to.not.exist() + jsDaemon = node - cb() - }, - (cb) => jsDaemon.api.add(data, cb), - (res, cb) => { + jsDaemon.init(cb) + }), + (cb) => jsDaemon.start(cb), + + (cb) => jsDaemon.api.add(data, (err, res) => { + expect(err).to.not.exist() + hash = res[0].hash catAndCheck(jsDaemon.api, hash, data, cb) - }, + }), (cb) => jsDaemon.stop(cb), (cb) => goDf.spawn({ repoPath: dir, + disposable: false, initOptions: { bits: 1024 } - }, cb), - (node, cb) => { + }, (err, node) => { + expect(err).to.not.exist() + goDaemon = node cb() - }, + }), + (cb) => goDaemon.start(cb), (cb) => catAndCheck(goDaemon.api, hash, data, cb), (cb) => goDaemon.stop(cb) ], done)